lkml.org 
[lkml]   [2015]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 5/5] misc: eeprom_93xx46: Add support for a GPIO 'select' line.
> >  #ifdef CONFIG_OF
> > +static void select_assert(void *context)
> > +{
> > + struct eeprom_93xx46_dev *edev = context;
> > +
> > + gpiod_set_value_cansleep(gpio_to_desc(edev->pdata->select_gpio), 1);
>
> I would suggest to use gpio_set_value()

Could you explain why?

Maybe this gpio is on an SPI GPIO expander?


> > static const struct of_device_id eeprom_93xx46_of_table[] = {
> > { .compatible = "eeprom-93xx46", },
> > { .compatible = "atmel,at93c46d", .data = &atmel_at93c46d_data, },
> > @@ -385,6 +402,15 @@ static int eeprom_93xx46_probe_dt(struct spi_device *spi)
> > if (of_property_read_bool(np, "read-only"))
> > pd->flags |= EE_READONLY;
> >
> > + ret = of_get_named_gpio(np, "select-gpios", 0);
>
> gpios or gpio? I see only one requested gpio.

DT always uses the plural. Go read some bindins in Documentation/devicetree/bindings/

Andrew


\
 
 \ /
  Last update: 2015-11-19 15:41    [W:0.224 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site