Re: [PATCH RFC] h1940: use gpiolib for latch access

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

 



В сообщении от 4 августа 2010 18:26:35 автор Ben Dooks написал:
> >  	/* Configures BT serial port GPIOs */
> >  	s3c_gpio_cfgpin(S3C2410_GPH(0), S3C2410_GPH0_nCTS0);
> > 
> > -	s3c_gpio_cfgpull(S3C2410_GPH(0), S3C_GPIO_PULL_NONE);
> > +	s3c_gpio_setpull(S3C2410_GPH(0), S3C_GPIO_PULL_NONE);
> > 
> >  	s3c_gpio_cfgpin(S3C2410_GPH(1), S3C2410_GPIO_OUTPUT);
> > 
> > -	s3c_gpio_cfgpull(S3C2410_GPH(1), S3C_GPIO_PULL_NONE);
> > +	s3c_gpio_setpull(S3C2410_GPH(1), S3C_GPIO_PULL_NONE);
> > 
> >  	s3c_gpio_cfgpin(S3C2410_GPH(2), S3C2410_GPH2_TXD0);
> > 
> > -	s3c_gpio_cfgpull(S3C2410_GPH(2), S3C_GPIO_PULL_NONE);
> > +	s3c_gpio_setpull(S3C2410_GPH(2), S3C_GPIO_PULL_NONE);
> > 
> >  	s3c_gpio_cfgpin(S3C2410_GPH(3), S3C2410_GPH3_RXD0);
> > 
> > -	s3c_gpio_cfgpull(S3C2410_GPH(3), S3C_GPIO_PULL_NONE);
> > +	s3c_gpio_setpull(S3C2410_GPH(3), S3C_GPIO_PULL_NONE);
> 
> Is this an error, or have you merged a part of a different patch
> into this one?

Will move into separate patch
 
> > +#define H1940_PA_LATCH		(S3C2410_CS2)
> > +
> > +#define H1940_LATCH_GPIO(x)		(S3C_GPIO_END + x)
> > +
> > +#define H1940_LATCH_BIT(x)		(1 << (x + 16 - S3C_GPIO_END))
> 
> you probably want an () around the 'x's in the above defines.

Yep
 
> computing the bit seperately to the call to h1940_latch_control
> would have made the code easier to read.
> 
> > +	h1940_latch_control(value ? 0 : (1 << (offset + 16)),
> > +		value ? (1 << (offset + 16)) : 0);

Ok

Regards
Vasily

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux