Re: [PATCH leds/for-next v2 2/2] leds: turris-omnia: Add support for 256 brightness values

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

 



Hi!

> >@@ -166,10 +174,19 @@ static int omnia_leds_probe(struct i2c_client *client,
> >  static int omnia_leds_remove(struct i2c_client *client)
> >  {
> >+	u8 buf[5];
> >+
> >  	/* put all LEDs into default (HW triggered) mode */
> >  	i2c_smbus_write_byte_data(client, CMD_LED_MODE,
> >  				  CMD_LED_MODE_LED(OMNIA_BOARD_LEDS));
> >+	/* set all LEDs color to [255, 255, 255] */
> >+	buf[0] = CMD_LED_COLOR;
> >+	buf[1] = OMNIA_BOARD_LEDS;
> >+	buf[2] = buf[3] = buf[4] = 255;
> >+
> >+	i2c_master_send(client, buf, 5);
> >+
> >  	return 0;
> >  }
> 
> I wonder if we're doing right merging this driver in this form.
> We break the rule one-led-class-device-per-one-channel.
> We don't have LED multi color support yet, so this should support
> RGB LEDs in the old manner. Or switch to using LED multi color
>  class.

Fair point.

We treat it as a white LED instead of RGB LED at this
point. One-led-per-channel would be problematic, as hardware
"triggers" are common for all three channels.

So I thought we could go from "white" led to multicolor, when it
becomes available, without going through One-led-per-channel...

I agree this is not quite standard.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature


[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