Received: by 10.223.185.116 with SMTP id b49csp1153786wrg; Wed, 14 Feb 2018 12:28:01 -0800 (PST) X-Google-Smtp-Source: AH8x225Wowjv+QLwxzZ313CKa7xA6sYTT/9FZyfTebpL/ULGlqjrE6cW6qT0+I1dJlkhs48RPoLi X-Received: by 2002:a17:902:69cf:: with SMTP id m15-v6mr241872pln.104.1518640081333; Wed, 14 Feb 2018 12:28:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518640081; cv=none; d=google.com; s=arc-20160816; b=D/hz2/Cst3xIXR1Nf+9iy+JvJ7lYqRC41NCB7F83ZlcPHtAMSLHOo0vo3zBWausU7W 0VGb/c/85BkOJqjlvhSL49TNbUKTqOSo690q1XjlxTF9rsK8CoatvQYY+g2q9hXx/b4l RDIpGGHu5snOYziEb19HJoqs/s/jjOQ9aSQ6S5JwU3XhLTUDPr8izrrWD7Y/ByE2Dcus /e+V/Xwc/wOIXpoG+I7EqnLxQo5iOyrn6YmKebIzf+eg5EH57ieg4ks2h5ocU08maBn8 esmJwMbFsarN4q7OCqwhqzfx0boDwCe5sRt6cBnbb61/it1KDhi2zghpx83RBFtlhZkm 2n4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=64RtVAHPKzYK0n8yZ/n8CeE4IFTv3aPAtVpCcK8nDBM=; b=oPRRmuZsuv2rQgSgzeylaRCdpvpWl7Zpbiw18WjmHWR4wJ4Zm7Dnu9QzAv0Sr8/FU5 k5zVGdwHtbrKdxj/fcku1A3GhVpTPsuOTJlwF8ekEdk2PcU5AGfmSwUWAG/GhTSoQj66 JgmYZq+vaKhONshtJrJvURv+RGfah2UpRJpifpXr78jewsGggXes5GmSG47fSsNsaPEl ContxmIwFAYbxEAqvKlAr0I3JdWRB55ye3IdWYZvVckHMNI+kpsqpkQVPUX31GF90nC7 GJSdJZyqvFyoecOWBtlTtt0yYiW0B9X81KsEuyhjA9a3bHgAW3RVPvlmoFa231fSERLr qQfw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f1-v6si279193plb.329.2018.02.14.12.27.46; Wed, 14 Feb 2018 12:28:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935031AbeBNU0Y (ORCPT + 99 others); Wed, 14 Feb 2018 15:26:24 -0500 Received: from mail.free-electrons.com ([62.4.15.54]:38186 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751140AbeBNU0W (ORCPT ); Wed, 14 Feb 2018 15:26:22 -0500 Received: by mail.free-electrons.com (Postfix, from userid 110) id E2113207FD; Wed, 14 Feb 2018 21:26:20 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [88.191.26.124]) by mail.free-electrons.com (Postfix) with ESMTPSA id A89FA203B0; Wed, 14 Feb 2018 21:26:10 +0100 (CET) Date: Wed, 14 Feb 2018 21:26:10 +0100 From: Alexandre Belloni To: Michael Grzeschik Cc: a.zummo@towertech.it, linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux@roeck-us.net, jdelvare@suse.com, kernel@pengutronix.de, Denis.Osterland@diehl.com Subject: Re: [PATCH 1/4] rtc: isl1208: Fix unintended clear of SR bits Message-ID: <20180214202610.GD8219@piout.net> References: <20180123121801.4214-1-m.grzeschik@pengutronix.de> <20180123121801.4214-2-m.grzeschik@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180123121801.4214-2-m.grzeschik@pengutronix.de> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 23/01/2018 at 13:17:58 +0100, Michael Grzeschik wrote: > From: Denis Osterland > > After successful > sr = isl1208_i2c_set_regs(client, 0, regs, ISL1208_RTC_SECTION_LEN); > sr will be 0. > As a result > sr = i2c_smbus_write_byte_data(client, ISL1208_REG_SR, > sr & ~ISL1208_REG_SR_WRTC); > is equal to > sr = i2c_smbus_write_byte_data(client, ISL1208_REG_SR, 0); > which clears all flags in SR. > > Add an additional read of SR, to have value of SR in sr again. > > Signed-off-by: Denis Osterland > Signed-off-by: Michael Grzeschik > --- > drivers/rtc/rtc-isl1208.c | 5 +++++ > 1 file changed, 5 insertions(+) > Applied, thanks. -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com