Re: [PATCH] gpio: mxs: implement get_direction callback

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

 



Mon, 17 Nov 2014 09:44:10 +0100 от Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>:
> Hello Alexander,
> 
> On Mon, Nov 17, 2014 at 11:38:54AM +0300, Alexander Shiyan wrote:
> > Hello.
> > 
> > ...
> > > > struct mctrl_gpios *mctrl_gpio_init(struct device *dev, unsigned int
> > > > idx, int *irqs)
> > > What is idx about? I see it already in the mctrl_gpio API, but there is
> > > no documentation about how it's used. Is it always 0?
> > 
> > This could be used for drivers with several UARTs, which registered at once.
> Then what about:
> 
> 	/**
> 	 * Document what idx is about here.
> 	 */
> 	struct mctrl_gpios *mctrl_gpio_init_index(struct uart_port *port, unsigned int idx);
> 	static inline struct mctrl_gpios *mctrl_gpio_init(struct uart_port *port)
> 	{
> 		return mctrl_gpio_init_index(port, 0);
> 	}
> 
> ? That matches how gpio and of functions use the indexed variants.

This is planned by me for "sccnxp" driver at least.

---

��.n��������+%������w��{.n�����{��
b���ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux