From patchwork Mon May 13 13:47:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 243408 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-gg0-x239.google.com (mail-gg0-x239.google.com [IPv6:2607:f8b0:4002:c02::239]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id DEF462C008C for ; Mon, 13 May 2013 23:47:34 +1000 (EST) Received: by mail-gg0-f185.google.com with SMTP id v5sf1708956ggn.2 for ; Mon, 13 May 2013 06:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=x-received:x-beenthere:x-received:received-spf:x-received :message-id:subject:from:to:cc:date:x-mailer:mime-version :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-google-group-id:list-post :list-help:list-archive:sender:list-subscribe:list-unsubscribe :content-type; bh=yW/4O6c3372UjJbti9piQ7xXArySS1jZSgOH/ukphuo=; b=O96vsTFtogMODHjNTEZ7jH0o+d6ZzgC9x6Kxr9UbFwx5BB+l/ABX34D2D2glZDjhKR fMwOH5kWnNpjUVd94FhO50nUrxv+UAtKkFtWNRbqWEJxAABQbloydqr09t6wthS+E+8v DDZD+TJ613v2wRN6XyYVyGy7solcrADWGb5W3amIahy4hMskdaISMXQ4M/DypqOgcfph 4U11DNTuAKp48vu34cOmzE03FZglHwoj9LxMRzL9pv3G51zC+5blgWxkRsvfLam2P62a nbTiJgBV0uHD0wCpnqh47MCcbNkr3OUyyUdGMGjSP4KgyuqF6i+oNIlNIjbywl2RGwBK JjUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-beenthere:x-received:received-spf:x-received :message-id:subject:from:to:cc:date:x-mailer:mime-version :x-gm-message-state:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type; bh=yW/4O6c3372UjJbti9piQ7xXArySS1jZSgOH/ukphuo=; b=JQWVJcxrJnBHTBMEeLXJ6yOCzZkVW6Kq5ihPn40v9VSuddR2qwgcPlna4SDk6cF9Ep +lyoedMx/KD4PWH8zalLbFiynJS7q3x4oj5CnMA3N0PjgACydxawCX7yiKitLK/QuOs0 cqhwpkWN8t+ZpksUzDCDG3YTiEshvoIXYmdLWoerNJjyQ7qHq3OLus6rld06TXlFQbFc hjOzuZAMbZbvGEbKcC1ysxzktvtDwjo0jxoZYrRXVhVrSIMdyhVDlKYdbevxLVsJdypm W/zWgCL+SPBpwYuDklK7mj18ZLZ128mbrKVn8Xrzalr3Hv73WvvivJ/KqCd5jtmrSQ8Z hlfA== X-Received: by 10.50.111.230 with SMTP id il6mr1460624igb.14.1368452850311; Mon, 13 May 2013 06:47:30 -0700 (PDT) X-BeenThere: rtc-linux@googlegroups.com Received: by 10.50.128.196 with SMTP id nq4ls1865068igb.4.gmail; Mon, 13 May 2013 06:47:29 -0700 (PDT) X-Received: by 10.68.131.227 with SMTP id op3mr527864pbb.2.1368452849806; Mon, 13 May 2013 06:47:29 -0700 (PDT) Received: from mail-pb0-x22f.google.com (mail-pb0-x22f.google.com [2607:f8b0:400e:c01::22f]) by gmr-mx.google.com with ESMTPS id qo12si1879685pbb.1.2013.05.13.06.47.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 May 2013 06:47:29 -0700 (PDT) Received-SPF: pass (google.com: domain of axel.lin@ingics.com designates 2607:f8b0:400e:c01::22f as permitted sender) client-ip=2607:f8b0:400e:c01::22f; Received: by mail-pb0-f47.google.com with SMTP id rr4so1198620pbb.6 for ; Mon, 13 May 2013 06:47:29 -0700 (PDT) X-Received: by 10.68.170.228 with SMTP id ap4mr28992477pbc.209.1368452849632; Mon, 13 May 2013 06:47:29 -0700 (PDT) Received: from [192.168.0.102] (114-39-96-109.dynamic.hinet.net. [114.39.96.109]) by mx.google.com with ESMTPSA id ea15sm15078202pad.16.2013.05.13.06.47.27 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 May 2013 06:47:28 -0700 (PDT) Message-ID: <1368452840.10208.2.camel@phoenix> Subject: [rtc-linux] [PATCH] rtc: rv3029c2: Fix disabling AIE irq From: Axel Lin To: Andrew Morton Cc: Heiko Schocher , Alessandro Zummo , rtc-linux@googlegroups.com Date: Mon, 13 May 2013 21:47:20 +0800 X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 X-Gm-Message-State: ALoCoQk2MYTuMW6ig3HrCsQ86hD5BrzeostZvy3otXHPa3wjVsFmwssXv7G8+FZs85G5LCpT2O8W X-Original-Sender: axel.lin@ingics.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of axel.lin@ingics.com designates 2607:f8b0:400e:c01::22f as permitted sender) smtp.mail=axel.lin@ingics.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , In the disable AIE irq code path, current code passes "1" to enable parameter of rv3029c2_rtc_i2c_alarm_set_irq(). Thus it does not disable AIE irq. Signed-off-by: Axel Lin Acked-by: Heiko Schocher --- Hi Heiko, I don't have the hardware to test, but current code looks obviously wrong. I'd appreciate if you can review and test this patch. I think this patch should be also applied to stable trees. Regards, Axel drivers/rtc/rtc-rv3029c2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-rv3029c2.c b/drivers/rtc/rtc-rv3029c2.c index 5032c24..9100a34 100644 --- a/drivers/rtc/rtc-rv3029c2.c +++ b/drivers/rtc/rtc-rv3029c2.c @@ -310,7 +310,7 @@ static int rv3029c2_rtc_i2c_set_alarm(struct i2c_client *client, dev_dbg(&client->dev, "alarm IRQ armed\n"); } else { /* disable AIE irq */ - ret = rv3029c2_rtc_i2c_alarm_set_irq(client, 1); + ret = rv3029c2_rtc_i2c_alarm_set_irq(client, 0); if (ret) return ret;