> Just for information
> 
> Here is how I get the error-led on Ubuntu 8.10 Intrepid to work
> 
> # modprobe cs5535_gpio major=252 mask=0xffffffff
> # mknod /dev/error_led c 252 6
> 
> Turning on error_led:
> # echo 1 > /dev/error_led
> 
> Turning off error_led
> # echo 0 > /dev/error_led
> 
> 
> The only thing is, that, at least for myself, it is not possible to
> read-out the state of the error_led.
> # cat /dev/error_led
> 0iOTPd
> 
> Regardless if error_led is on or off.
> 
> 
> Joerg

Hi Joerg,

Recently I carried out some experiments with that cs5535_gpio driver.
I've found a recent patch for it:
  http://www.mail-archive.com/[email protected]/msg00053.html

It provides an automatic creation of the corresponding devices and adds
extra controls to GPIOs:
  static struct gpio_regmap rm[] = { 
  { 0x30, 0x00, '1', '0' },       /* GPIOx_READ_BACK / GPIOx_OUT_VAL */ 
  { 0x20, 0x20, 'I', 'i' },       /* GPIOx_IN_EN */ 
  { 0x04, 0x04, 'O', 'o' },       /* GPIOx_OUT_EN */ 
  { 0x10, 0x10, 'A', 'a' },       /* GPIOx_OUT_AUX1_SEL */ 
  { 0x14, 0x14, 'B', 'b' },       /* GPIOx_OUT_AUX2_SEL */ 
  { 0x08, 0x08, 't', 'T' },       /* GPIOx_OUT_OD_EN */ 
  { 0x18, 0x18, 'P', 'p' },       /* GPIOx_OUT_PU_EN */ 
  { 0x1c, 0x1c, 'D', 'd' },       /* GPIOx_OUT_PD_EN */ 
  { 0x24, 0x24, 'N', 'n' },       /* GPIOx_IN_INV_EN */ 
  { 0x0c, 0x0c, 'X', 'x' },       /* GPIOx_OUT_INV_EN */ 
  { 0x00, 0x00, 'H', 'L' },       /* GPIOx_OUT_VAL */          };       

I found that indeed reading the device returns 0 regardless the actual
status, but now the last symbol H or L shows the state.
I didn't dug deeper, but hope this may be helpful.

Sergey 
_______________________________________________
Soekris-tech mailing list
[email protected]
http://lists.soekris.com/mailman/listinfo/soekris-tech

Reply via email to