Re: [PATCH v41 2/3] dt-binding: can: mcp25xxfd: document device tree bindings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/23/20 5:26 AM, Manivannan Sadhasivam wrote:
>>>> +title: Microchip MCP2517/18FD stand-alone CAN controller device tree bindings
>>>> +
>>>
>>> MCP251{7/8}FD?
>>
>> Which expansion rules should be use for the title? In sh-like shells it would be
>> MCP251{7,8}FD.
>>
> 
> Either one. I was just concerned about the original one which might create
> ambiguity.

I've changed this to:

> Microchip MCP2517FD and MCP2518FD stand-alone CAN controller device tree
> bindings

[...]

>>>> +  rx-int-gpios:
> 
> This doesn't look like a standard property. So I think you need to add
> 'microchip' prefix to make it as vendor specific.

makes sense.

>>>> +    description:
>>>> +      GPIO phandle of GPIO connected to to INT1 pin of the MCP25XXFD, which
>>>> +      signals a pending RX interrupt.
>>>> +    maxItems: 1
>>>> +
>>>> +  spi-max-frequency:
>>>> +    description:
>>>> +      Must be half or less of "clocks" frequency.
>>>> +    maximum: 20000000
>>>> +
>>>> +required:
>>>> +  - compatible
>>>> +  - reg
>>>> +  - interrupts-extended
>>>> +  - clocks
>>>> +
>>>
>>> The controller is capable of generating clocks and also able to control few
>>> GPIOs. So eventually you need to document those properties in bindings even
>>> your driver is not supporting all of them atm.
>>
>> I'd like to add support for clocks and GPIOs as soon as someone needs them. DT
>> bindings will go along with that. So far I have no customer that needs support
>> for that, do you?>
> DT binding should describe what the controller is capable of and not the
> capability of the driver. You can always add functionality to driver but binding
> should stay as it is (although there are exceptions...).
As Oleksij pointed out, this make driver development very complicated. I'm not
even sure how to properly abstract the GPIO support. For open drain pinctrl
would be best, haveing one microchip,open-drain property in the DT would effect
all GPIOs.

Further this means I have to look into the driver if a documented property is
implemented and does what it is advertised to do? That sounds very counter
intuitive for me.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux