[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+HBbNHp2-a-zgUKRLUQVLcs4qcUim=_75YgVZApH1hRrAaP6w@mail.gmail.com>
Date: Thu, 27 May 2021 21:14:03 +0200
From: Robert Marko <robert.marko@...tura.hr>
To: Guenter Roeck <linux@...ck-us.net>
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 6:37 PM Guenter Roeck <linux@...ck-us.net> wrote:
>
> On 5/27/21 7:58 AM, Robert Marko wrote:
> [ ... ]
>
> >>>>>> I tried applying the block support for mv64xx as well:
> >>>>>> https://patchwork.ozlabs.org/project/linux-i2c/patch/20200118115820.9080-1-fuga@studiofuga.com/
> >>>>
> >>>> That patch would be needed, but it looks buggy to me. This chunk:
> >>>>
> >>>> + drv_data->effective_length = data+1;
> >>>> + drv_data->bytes_left = data+1;
> >>>> + drv_data->msg->len = data+1;
> >>>>
> >>>> should be:
> >>>>
> >>>> + drv_data->effective_length = data+1;
> >>>> + drv_data->bytes_left = data;
> >>>> + drv_data->msg->len = data+1;
> >>>>
> >>>> It should also make sure that 'data' is not larger than I2C_SMBUS_BLOCK_MAX,
> >>>> and bail out if it isn't.
> >>>
> >>> Yeah, I did not check the contents, I just saw 2 reviews and tested it
> >>> since it can't hurt.
> >>
> >> That patch doesn't work at all. Make the above change, and also change
> >> the type of effective_length from u32 to int, and try again.
> >
> > I was just looking and it, and doing the changes you recommended make
> > no difference at all.
> >
>
> Is the i2c controller compatible with marvell,mv78230-i2c ?
> The block transfers would not work in that case. Let me know
> and I'll send you a patch that might fix it.
Yes, the CPU is Armada 7040 and I can see that compatible is
marvell,mv78230-i2c indeed.
It would be great if you have the patch,
Regards
Robert
>
> Guenter
--
Robert Marko
Staff Embedded Linux Engineer
Sartura Ltd.
Lendavska ulica 16a
10000 Zagreb, Croatia
Email: robert.marko@...tura.hr
Web: www.sartura.hr
Powered by blists - more mailing lists