From: Wolfgang Denk Date: Fri, 23 Aug 2019 11:22:51 +0200 Subject: [U-Boot] [PATCH v4 1/4] rtc: ds3232/ds3231: Add support to generate 32KHz output for driver module In-Reply-To: <20190726112403.32842-1-chuanhua.han@nxp.com> References: <20190726112403.32842-1-chuanhua.han@nxp.com> Message-ID: <20190823092251.A9495240085@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Chuanhua Han, In message <20190726112403.32842-1-chuanhua.han@nxp.com> you wrote: > This patch add an implementation of the rtc_enable_32khz_output() that > uses the driver model i2c APIs. ... > + ret = i2c_get_chip_for_busnum(busnum, chip_addr, 1, &dev); > + if (!ret) > + ret = dm_i2c_reg_write(dev, RTC_STAT_REG_ADDR, > + RTC_STAT_BIT_BB32KHZ | > + RTC_STAT_BIT_EN32KHZ); Strictly speaking, this is a multi-line statement following the "if" so braces are required according to the coding style: if (!ret) { ret = dm_i2c_reg_write(dev, RTC_STAT_REG_ADDR, RTC_STAT_BIT_BB32KHZ | RTC_STAT_BIT_EN32KHZ); } Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de What can it profit a man to gain the whole world and to come to his property with a gastric ulcer, a blown prostate, and bifocals? -- John Steinbeck, _Cannery Row_