[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4128b288-2b9a-f9cd-01f3-a1d50d3e10bb@redhat.com>
Date: Tue, 12 Apr 2022 10:07:02 +0200
From: Javier Martinez Canillas <javierm@...hat.com>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Rob Herring <robh@...nel.org>,
DRI Development <dri-devel@...ts.freedesktop.org>,
Neil Armstrong <narmstrong@...libre.com>,
Mark Brown <broonie@...nel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Chen-Yu Tsai <wens@...nel.org>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>
Subject: Re: [PATCH v2 4/5] drm/solomon: Move device info from ssd130x-i2c to
the core driver
On 4/12/22 09:23, Geert Uytterhoeven wrote:
> Hi Javier,
>
> Thanks for your patch!
>
> On Mon, Apr 11, 2022 at 11:12 PM Javier Martinez Canillas
> <javierm@...hat.com> wrote:
>> These are declared in the ssd130x-i2c transport driver but the information
>> is not I2C specific, and could be used by other SSD130x transport drivers.
>>
>> Move them to the ssd130x core driver and just set the OF device entries to
>> an ID that could be used to lookup the correct device info from an array.
>>
>> While being there, also move the SSD130X_DATA and SSD130X_COMMAND control
>> bytes. Since even though are used by the I2C interface, it could also be
>
> though they are ... they could
>
Right, will fix it.
>> useful for other transport protocols such as SPI.
>>
>> Suggested-by: Chen-Yu Tsai <wens@...nel.org>
>> Signed-off-by: Javier Martinez Canillas <javierm@...hat.com>
>
>> --- a/drivers/gpu/drm/solomon/ssd130x.c
>> +++ b/drivers/gpu/drm/solomon/ssd130x.c
>
>> @@ -860,7 +890,14 @@ struct ssd130x_device *ssd130x_probe(struct device *dev, struct regmap *regmap)
>>
>> ssd130x->dev = dev;
>> ssd130x->regmap = regmap;
>> - ssd130x->device_info = device_get_match_data(dev);
>> +
>> + variant = (enum ssd130x_variants)device_get_match_data(dev);
>
> (uintptr_t), to avoid a cast from pointer to integer of different
> size warning.
>
Indeed. The kernel test robot reported the same.
>> +
>
> Please drop the blank line.
>
Ok.
>> + if (variant >= NR_SSD130X_VARIANTS)
>> + return ERR_PTR(dev_err_probe(dev, -EINVAL,
>> + "Invalid SSD130x variant\n"));
>> +
>> + ssd130x->device_info = &ssd130x_variants[variant];
>>
>> if (ssd130x->device_info->page_mode_only)
>> ssd130x->page_address_mode = 1;
>
> With the above fixed:
> Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
>
Thanks!
--
Best regards,
Javier Martinez Canillas
Linux Engineering
Red Hat
Powered by blists - more mailing lists