On 19.11.2015 16:18, Andrew Lunn wrote:
>>>  #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?

My point is that gpio_*() interface, gpio_set_value() or
gpio_set_value_cansleep(), might be preferred is this particular case.

I know it is legacy, but in this case there is no difference, if the
target have gpiolib, and the interface is broken, if the target does not
have gpiolib.

> 
>>>  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/
> 

Ok.

--
With best wishes,
Vladimir
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to