[EXT] Re: [PATCH v3 1/3] drivers: rtc: add pcf2131 rtc driver

Joy Zou joy.zou at nxp.com
Wed Mar 27 03:01:44 CET 2024


> -----Original Message-----
> From: Fabio Estevam <festevam at gmail.com>
> Sent: 2024年3月27日 6:10
> To: Joy Zou <joy.zou at nxp.com>
> Cc: Peng Fan <peng.fan at nxp.com>; Ye Li <ye.li at nxp.com>; Jacky Bai
> <ping.bai at nxp.com>; sbabic at denx.de; sjg at chromium.org;
> saproj at gmail.com; judge.packham at gmail.com; dl-uboot-imx
> <uboot-imx at nxp.com>; u-boot at lists.denx.de
> Subject: [EXT] Re: [PATCH v3 1/3] drivers: rtc: add pcf2131 rtc driver
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report
> this email' button
> 
> 
> On Tue, Mar 26, 2024 at 12:30 AM Joy Zou <joy.zou at nxp.com> wrote:
> 
> > +bool is_pcf2131_type(struct udevice *dev)
> 
> static bool
Will add static key word!
> 
> >  static int pcf2127_rtc_read(struct udevice *dev, uint offset, u8
> > *buffer, uint len)  {
> >         struct dm_i2c_chip *chip = dev_get_parent_plat(dev); @@
> -43,10
> > +75,64 @@ static int pcf2127_rtc_read(struct udevice *dev, uint offset, u8
> *buffer, uint l
> >         return dm_i2c_xfer(dev, &msg, 1);  }
> >
> > +static int pcf2131_rtc_lock(struct udevice *dev) {
> > +       int ret = 0;
> 
> No need to initialize ret with 0.
Will remove initialization 0.
> 
> > +static int pcf2131_rtc_unlock(struct udevice *dev) {
> > +       int ret = 0;
> 
> Ditto.
> 
> >  static int pcf2127_rtc_write(struct udevice *dev, uint offset,
> >                              const u8 *buffer, uint len)  {
> > -       return dm_i2c_write(dev, offset, buffer, len);
> > +       int ret = 0;
> 
> Ditto.
Will remove initialization 0.
Thanks for your comments!
BR
Joy Zou


More information about the U-Boot mailing list