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

Andy Shevchenko andriy.shevchenko at linux.intel.com
Sun May 28 03:55:20 PDT 2023


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):

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",
};

-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list