/* Return an LED selector register value based on an existing one, with the appropriate 2-bit state value set for the given LED number (0-3).  */
static u8 pca955x_ledsel(u8 oldval, int led_num, int state)
/* Return an LED selector register value based on an existing one, with the appropriate 2-bit state value set for the given LED number (0-3).  */
static u8 pca955x_ledsel(u8 oldval, int led_num, int state)
{
	return (oldval & (~(0x3 << (led_num << 1)))) |
		((state & 0x3) << (led_num << 1));
}