[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210527221155.GA3461420@roeck-us.net>
Date: Thu, 27 May 2021 15:11:55 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Robert Marko <robert.marko@...tura.hr>
Cc: jdelvare@...e.com, corbet@....net, linux-hwmon@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
Luka Perkov <luka.perkov@...tura.hr>, jmp@...phyte.org,
Paul Menzel <pmenzel@...gen.mpg.de>,
Donald Buczek <buczek@...gen.mpg.de>
Subject: Re: [PATCH 1/3] hwmon: (pmbus) Add driver for Delta DPS-920AB PSU
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
Powered by blists - more mailing lists