Re: [PATCH v2 leds-next 3/3] leds: turris-omnia: Add support for continuous brightness

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

 



On Wed, 27 Mar 2019 23:12:09 +0100
Jacek Anaszewski <jacek.anaszewski@xxxxxxxxx> wrote:

> > +	buf[0] = CMD_LED_COLOR;
> > +	buf[1] = idx;
> > +	buf[2] = buf[3] = buf[4] = brightness;  
> 
> If each logical LED has has three channels, then to be compatible with
> current RGB LEDs in the LED subsystem, the channels must be exposed as
> individual LED class devices.

I talked about this with Pavel, and decided that I will do RGB part
once multichannel/RGB LED class interface is decided. This would just
be a temporary workaround to support continuous brightness. If you
don't want it, I won't send it in next version.

> 
> >   	mutex_lock(&leds->lock);
> > +
> >   	ret = i2c_smbus_write_byte_data(leds->client,
> > CMD_LED_STATE, state);
> > +	if (ret >= 0)
> > +		ret = i2c_master_send(leds->client, buf, 5);  
> 
> Could you switch to using regmap for the whole driver, please?

If I read the regmap_i2c code correctly, it cannot handle this. If one
register is 1 byte wide, and other is 5 bytes, it won't work. Btw it is
not a regmap at all, this is a command interface. You can't read
information back from the controller for each "register".

Marek



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux