lkml.org 
[lkml]   [2018]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 8/8] mtd: maps: gpio-addr-flash: Add support for device-tree devices
Hi Boris
On Wed, Oct 3, 2018 at 7:01 PM Boris Brezillon
<boris.brezillon@bootlin.com> wrote:
>
> On Mon, 1 Oct 2018 14:43:51 +0200
> Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
>
> > +static int gpio_flash_probe_gpios(struct platform_device *pdev,
> > + struct async_state *state)
> > +{
> > + struct physmap_flash_data *pdata;
> > + struct device_node *dn;
> > + struct resource *gpios = NULL;
> > + int i;
> > +
> > + dn = pdev->dev.of_node;
> > + if (dn) {
> > + state->gpios = devm_gpiod_get_array(&pdev->dev, NULL,
> > + GPIOD_OUT_LOW);
>
> Did you consider using gpiod_set_array_value() to update the gpio vals
> instead of having your own update loop (the for loop in the
> gf_set_gpios() func)?

Yes briefly but there are some cons:

- I need to allocate the value_array
- I want to relay on my cached old values, so I still have to loop


--
Ricardo Ribalda

\
 
 \ /
  Last update: 2018-10-03 21:35    [W:0.040 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site