Re: [PATCH v2] meson saradc: add iio device attrib to switch channel 7 mux

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

 



On Sun, 28 May 2023 13:55:20 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

> On Sun, May 28, 2023 at 01:46:37PM +0300, Andy Shevchenko wrote:
> > On Sun, May 28, 2023 at 12:48:54AM +0300, George Stark wrote:  
> 
> ...
> 
> > > +static const char * const chan7_vol[] = {
> > > +	"gnd",
> > > +	"vdd/4",
> > > +	"vdd/2",
> > > +	"vdd*3/4",
> > > +	"vdd",
> > > +	"ch7_input",
> > > +};  
> 
> One more thing to discuss (Jonathan, what's your opinion?) I think the
> following easier to understand and has less problematic characters in the names
> (in case of sysfs direct use from shelll):

I suspect no one would use these particulary inputs directly from the shell,
but agreed that avoiding / where not absolutely necessary is a good idea.

Jonathan
> 
> static const char * const chan7_vol[] = {
> 	"gnd", // alternatively GND
> 	"0.25vdd", // alternatively 0.25_vdd, 0.25Vdd, 0.25_Vdd
> 	"0.5vdd",
> 	"0.75vdd",
> 	"vdd", // Vdd
> 	"ch7_input",
> };
> 
> That said, my personal preference:
> 
> static const char * const chan7_vol[] = {
> 	"GND",
> 	"0.25Vdd",
> 	"0.5Vdd",
> 	"0.75Vdd",
> 	"Vdd",
> 	"ch7_input",
> };
> 




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux