18c2ecf20Sopenharmony_ci=======================
28c2ecf20Sopenharmony_ciw1_ds2406 kernel driver
38c2ecf20Sopenharmony_ci=======================
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ciSupported chips:
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci  * Maxim DS2406 (and other family 0x12) addressable switches
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciAuthor: Scott Alfter <scott@alfter.us>
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ciDescription
128c2ecf20Sopenharmony_ci-----------
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ciThe w1_ds2406 driver allows connected devices to be switched on and off.
158c2ecf20Sopenharmony_ciThese chips also provide 128 bytes of OTP EPROM, but reading/writing it is
168c2ecf20Sopenharmony_cinot supported.  In TSOC-6 form, the DS2406 provides two switch outputs and
178c2ecf20Sopenharmony_cican be provided with power on a dedicated input.  In TO-92 form, it provides
188c2ecf20Sopenharmony_cione output and uses parasitic power only.
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciThe driver provides two sysfs files.  state is readable; it gives the
218c2ecf20Sopenharmony_cicurrent state of each switch, with PIO A in bit 0 and PIO B in bit 1.  The
228c2ecf20Sopenharmony_cidriver ORs this state with 0x30, so shell scripts get an ASCII 0/1/2/3 to
238c2ecf20Sopenharmony_ciwork with.  output is writable; bits 0 and 1 control PIO A and B,
248c2ecf20Sopenharmony_cirespectively.  Bits 2-7 are ignored, so it's safe to write ASCII data.
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ciCRCs are checked on read and write.  Failed checks cause an I/O error to be
278c2ecf20Sopenharmony_cireturned.  On a failed write, the switch status is not changed.
28