[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-hwmon
Subject:    Re: [PATCH 1/3] hwmon: (pmbus) Add driver for Delta DPS-920AB PSU
From:       Guenter Roeck <linux () roeck-us ! net>
Date:       2021-05-27 22:11:55
Message-ID: 20210527221155.GA3461420 () roeck-us ! net
[Download RAW message or body]

On Thu, May 27, 2021 at 09:43:33PM +0200, Robert Marko wrote:
[ ... ]
> 
> I can confirm that this does indeed enable block reads and
> i2c_smbus_read_block_data()
> works now.
> 

Follow-up:

> > +static void
> > +mv64xxx_i2c_do_read_data(struct mv64xxx_i2c_data *drv_data)
> > +{
> > +       u8 data;
> > +
> > +       data = readl(drv_data->reg_base + drv_data->reg_offsets.data);
> > +       drv_data->msg->buf[drv_data->byte_posn++] = data;
> > +
> > +       if (drv_data->msg->flags & I2C_M_RECV_LEN) {
> > +               if (!data || data > I2C_SMBUS_BLOCK_MAX) {
> > +                       /*
> > +                        * FIXME
> > +                        * Abort and report error. Needs to be
> > +                        * verified/tested on real hardware.
> > +                        */
> > +                       drv_data->rc = -EPROTO;
> > +                       mv64xxx_i2c_do_send_stop(drv_data);
> > +                       return;

Can you possibly test if this works ? Trying a block read on
any register which returns 0 or > 32 as first byte should do.

Thanks,
Guenter
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic