Message ID | 1479831207-32699-6-git-send-email-benjamin.gaignard@st.com |
---|---|
State | New |
Headers | show |
On 11/22/2016 06:01 PM, Benjamin Gaignard wrote: > [snip] >>> + "st,stm32-iio-timer5" >>> + "st,stm32-iio-timer6" >>> + "st,stm32-iio-timer7" >>> + "st,stm32-iio-timer8" >>> + "st,stm32-iio-timer9" >>> + "st,stm32-iio-timer10" >>> + "st,stm32-iio-timer11" >>> + "st,stm32-iio-timer12" >>> + "st,stm32-iio-timer13" >>> + "st,stm32-iio-timer14" >> >> We can't do this. This is a binding for a driver, not for the hardware. >> > > Unfortunately each instance for the hardware IP have little > differences like which triggers they could accept or size of the > counter register, > and I doesn't have value inside the hardware to distinguish them so > the only way I found is to use compatible. But IIO is not a piece of hardware, its a software framework in the Linux kernel.
On Tue, 22 Nov 2016, Benjamin Gaignard wrote: > [snip] > >> + "st,stm32-iio-timer5" > >> + "st,stm32-iio-timer6" > >> + "st,stm32-iio-timer7" > >> + "st,stm32-iio-timer8" > >> + "st,stm32-iio-timer9" > >> + "st,stm32-iio-timer10" > >> + "st,stm32-iio-timer11" > >> + "st,stm32-iio-timer12" > >> + "st,stm32-iio-timer13" > >> + "st,stm32-iio-timer14" > > > > We can't do this. This is a binding for a driver, not for the hardware. > > > > Unfortunately each instance for the hardware IP have little > differences like which triggers they could accept or size of the > counter register, > and I doesn't have value inside the hardware to distinguish them so > the only way I found is to use compatible. Can't you represent these as properties? -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
On Wed, Nov 23, 2016 at 09:17:58AM +0100, Benjamin Gaignard wrote: > If it is ok for you I will add "id" parameter in mfd driver and > forward it to the sub-devices drivers > to be able to distinguish the hardware blocks Please don't top post. No, it's not okay. If the counter sizes are different, then have a property for the counter size. Describe how they are different without numbering them. If you can't describe the differences, then it shouldn't matter which ones the OS picks to use. > 2016-11-22 18:18 GMT+01:00 Lee Jones <lee.jones@linaro.org>: > > On Tue, 22 Nov 2016, Benjamin Gaignard wrote: > > > >> [snip] > >> >> + "st,stm32-iio-timer5" > >> >> + "st,stm32-iio-timer6" > >> >> + "st,stm32-iio-timer7" > >> >> + "st,stm32-iio-timer8" > >> >> + "st,stm32-iio-timer9" > >> >> + "st,stm32-iio-timer10" > >> >> + "st,stm32-iio-timer11" > >> >> + "st,stm32-iio-timer12" > >> >> + "st,stm32-iio-timer13" > >> >> + "st,stm32-iio-timer14" I doubt the h/w manual calls these "IIO timers". > >> > > >> > We can't do this. This is a binding for a driver, not for the hardware. > >> > > >> > >> Unfortunately each instance for the hardware IP have little > >> differences like which triggers they could accept or size of the > >> counter register, > >> and I doesn't have value inside the hardware to distinguish them so > >> the only way I found is to use compatible. > > > > Can't you represent these as properties? > > > > -- > > Lee Jones > > Linaro STMicroelectronics Landing Team Lead > > Linaro.org │ Open source software for ARM SoCs > > Follow Linaro: Facebook | Twitter | Blog > > > > -- > Benjamin Gaignard > > Graphic Study Group > > Linaro.org │ Open source software for ARM SoCs > > Follow Linaro: Facebook | Twitter | Blog
diff --git a/Documentation/devicetree/bindings/iio/timer/stm32-iio-timer.txt b/Documentation/devicetree/bindings/iio/timer/stm32-iio-timer.txt new file mode 100644 index 0000000..b80025e --- /dev/null +++ b/Documentation/devicetree/bindings/iio/timer/stm32-iio-timer.txt @@ -0,0 +1,33 @@ +timer IIO trigger bindings for STM32 + +Must be a child of STM32 multifunctions timer driver + +Required parameters: +- compatible: must be one of the follow value: + "st,stm32-iio-timer1" + "st,stm32-iio-timer2" + "st,stm32-iio-timer3" + "st,stm32-iio-timer4" + "st,stm32-iio-timer5" + "st,stm32-iio-timer6" + "st,stm32-iio-timer7" + "st,stm32-iio-timer8" + "st,stm32-iio-timer9" + "st,stm32-iio-timer10" + "st,stm32-iio-timer11" + "st,stm32-iio-timer12" + "st,stm32-iio-timer13" + "st,stm32-iio-timer14" + +Example: + mfd_timer1: mfdtimer1@40010000 { + compatible = "st,stm32-mfd-timer1"; + reg = <0x40010000 0x400>; + clocks = <&rcc 0 160>; + clock-names = "mfd_timer_clk"; + interrupts = <27>; + + trigger1: trigger1@40010000 { + compatible = "st,stm32-iio-timer1"; + }; + };
Define bindings for stm32 IIO timer Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com> --- .../bindings/iio/timer/stm32-iio-timer.txt | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/timer/stm32-iio-timer.txt -- 1.9.1