w1_ds2406.rst 1.0 KB

123456789101112131415161718192021222324252627
  1. =======================
  2. w1_ds2406 kernel driver
  3. =======================
  4. Supported chips:
  5. * Maxim DS2406 (and other family 0x12) addressable switches
  6. Author: Scott Alfter <[email protected]>
  7. Description
  8. -----------
  9. The w1_ds2406 driver allows connected devices to be switched on and off.
  10. These chips also provide 128 bytes of OTP EPROM, but reading/writing it is
  11. not supported. In TSOC-6 form, the DS2406 provides two switch outputs and
  12. can be provided with power on a dedicated input. In TO-92 form, it provides
  13. one output and uses parasitic power only.
  14. The driver provides two sysfs files. state is readable; it gives the
  15. current state of each switch, with PIO A in bit 0 and PIO B in bit 1. The
  16. driver ORs this state with 0x30, so shell scripts get an ASCII 0/1/2/3 to
  17. work with. output is writable; bits 0 and 1 control PIO A and B,
  18. respectively. Bits 2-7 are ignored, so it's safe to write ASCII data.
  19. CRCs are checked on read and write. Failed checks cause an I/O error to be
  20. returned. On a failed write, the switch status is not changed.