[U-Boot] [EXT] Re: [PATCH v2 1/4] rtc: ds3232/ds3231: Add support to generate 32KHz output for driver module

Chuanhua Han chuanhua.han at nxp.com
Thu Jul 25 09:33:42 UTC 2019



> -----Original Message-----
> From: Wolfgang Denk <wd at denx.de>
> Sent: 2019年7月25日 15:34
> To: Chuanhua Han <chuanhua.han at nxp.com>
> Cc: albert.u.boot at aribaud.net; Prabhakar Kushwaha
> <prabhakar.kushwaha at nxp.com>; Priyanka Jain <priyanka.jain at nxp.com>;
> Rajesh Bhagat <rajesh.bhagat at nxp.com>; u-boot at lists.denx.de;
> lukma at denx.de; trini at konsulko.com
> Subject: [EXT] Re: [PATCH v2 1/4] rtc: ds3232/ds3231: Add support to generate
> 32KHz output for driver module
> 
> Caution: EXT Email
> 
> Dear Chuanhua Han,
> 
> In message <20190725043934.30236-1-chuanhua.han at nxp.com> you wrote:
> > This patch add an implementation of the rtc_enable_32khz_output() that
> > uses the driver model i2c APIs.
> ...
> > +config DS3231_BUS_NUM
> > +     hex "I2C bus of the DS3231 device"
> > +     default 0
> > +
> 
> I know this is likely just an academic question - buit what happens if we have
> two such devices on different busses?
Ah, that really needs to be considered! Then the method I came up with is: take the rtc_enable_32khz_output function with 
the udeice parameter to uniquely determine the specific RTC device, and then set the register. I wonder if this method is feasible?
> 
> 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
> "Beware of bugs in the above code; I have only proved it correct, not
> tried it."                                             - Donald Knuth


More information about the U-Boot mailing list