Re: [RFC] tty/serial/8250: use mctrl_gpio helpers

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

 



Hello Yegor,

On Fri, Mar 11, 2016 at 10:30:14PM +0100, Yegor Yefremov wrote:
> On Fri, Mar 11, 2016 at 5:26 PM, Peter Hurley <peter@xxxxxxxxxxxxxxxxxx> wrote:
> > On 03/11/2016 08:19 AM, Uwe Kleine-König wrote:
> >> On Fri, Mar 11, 2016 at 05:06:30PM +0100, Yegor Yefremov wrote:
> >>> On Thu, Mar 10, 2016 at 8:55 PM, Peter Hurley <peter@xxxxxxxxxxxxxxxxxx> wrote:
> >>>> On 03/10/2016 08:36 AM, Peter Hurley wrote:
> >>>>> Rather, transform
> >>>>>
> >>>>>       serial_out(port, UART_MCR, val);
> >>>>>       serial_port_out(up, UART_MCR, val);
> >>>>>
> >>>>> to
> >>>>>
> >>>>>       serial8250_out_MCR(up, val);
> >>>>>
> >>>>> and add the gpio setting to that.
> >>>>> Do the transform first in a prequel patch; then add gpio to that.
> >>>>>
> >>>>> Similarly for serial_in(port, UART_MCR)
> >>>
> >>> To implement serial8250_in_MCR() we will need something like
> >>> mctrl_gpio_get_mcr(), because mctrl_gpio_get() returns only GPIO
> >>> values in input mode. Peter, Uwe what do you think about it?
> >
> > mctrl_gpio_read() ?
> 
> What about renaming the functions to reflect their actual meaning?
> 
> mctrl_gpio_get_mcr()
> mctrl_gpio_set_mcr()
> mctrl_gpio_get_msr()

I think this is only understandable, if you have 8250 in mind where (I
guess) the registers to set and read the handshaking lines are called
mcr and msr.

So I don't think this is a good idea.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux