docs: w1: convert to ReST and add to the kAPI group of docs

The 1wire documentation was written with w1 developers in
mind, so, it makes sense to add it together with the driver-api
set.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
Mauro Carvalho Chehab
2019-07-31 17:08:53 -03:00
committed by Jonathan Corbet
parent f139291c71
commit e9bb627561
23 changed files with 308 additions and 169 deletions

View File

@@ -1,13 +1,19 @@
====================
Kernel driver ds2482
====================
Supported chips:
* Maxim DS2482-100, Maxim DS2482-800
Prefix: 'ds2482'
Addresses scanned: None
Datasheets:
http://datasheets.maxim-ic.com/en/ds/DS2482-100.pdf
http://datasheets.maxim-ic.com/en/ds/DS2482-800.pdf
- http://datasheets.maxim-ic.com/en/ds/DS2482-100.pdf
- http://datasheets.maxim-ic.com/en/ds/DS2482-800.pdf
Author: Ben Gardner <bgardner@wabtec.com>
@@ -23,9 +29,11 @@ General Remarks
---------------
Valid addresses are 0x18, 0x19, 0x1a, and 0x1b.
However, the device cannot be detected without writing to the i2c bus, so no
detection is done. You should instantiate the device explicitly.
$ modprobe ds2482
$ echo ds2482 0x18 > /sys/bus/i2c/devices/i2c-0/new_device
::
$ modprobe ds2482
$ echo ds2482 0x18 > /sys/bus/i2c/devices/i2c-0/new_device

View File

@@ -1,7 +1,9 @@
====================
Kernel driver ds2490
====================
Supported chips:
* Maxim DS2490 based
Author: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
@@ -18,6 +20,7 @@ which has 0x81 family ID integrated chip and DS2490
low-level operational chip.
Notes and limitations.
- The weak pullup current is a minimum of 0.9mA and maximum of 6.0mA.
- The 5V strong pullup is supported with a minimum of 5.9mA and a
maximum of 30.4 mA. (From DS2490.pdf)
@@ -65,4 +68,5 @@ Notes and limitations.
reattaching would clear the problem. usbmon output in the guest and
host did not explain the problem. My guess is a bug in either qemu
or the host OS and more likely the host OS.
-- 03-06-2008 David Fries <David@Fries.net>
03-06-2008 David Fries <David@Fries.net>

View File

@@ -0,0 +1,14 @@
. SPDX-License-Identifier: GPL-2.0
=====================
1-wire Master Drivers
=====================
.. toctree::
:maxdepth: 1
ds2482
ds2490
mxc-w1
omap-hdq
w1-gpio

View File

@@ -1,12 +0,0 @@
Kernel driver mxc_w1
====================
Supported chips:
* Freescale MX27, MX31 and probably other i.MX SoCs
Datasheets:
http://www.freescale.com/files/32bit/doc/data_sheet/MCIMX31.pdf?fpsp=1
http://cache.freescale.com/files/dsp/doc/archive/MCIMX27.pdf?fsrch=1&WT_TYPE=
Data%20Sheets&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation
Author: Originally based on Freescale code, prepared for mainline by
Sascha Hauer <s.hauer@pengutronix.de>

View File

@@ -0,0 +1,17 @@
====================
Kernel driver mxc_w1
====================
Supported chips:
* Freescale MX27, MX31 and probably other i.MX SoCs
Datasheets:
- http://www.freescale.com/files/32bit/doc/data_sheet/MCIMX31.pdf?fpsp=1
- http://cache.freescale.com/files/dsp/doc/archive/MCIMX27.pdf?fsrch=1&WT_TYPE=Data%20Sheets&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation
Author:
Originally based on Freescale code, prepared for mainline by
Sascha Hauer <s.hauer@pengutronix.de>

View File

@@ -1,9 +1,10 @@
Kernel driver for omap HDQ/1-wire module.
========================================
Kernel driver for omap HDQ/1-wire module
========================================
Supported chips:
================
HDQ/1-wire controller on the TI OMAP 2430/3430 platforms.
HDQ/1-wire controller on the TI OMAP 2430/3430 platforms.
A useful link about HDQ basics:
===============================
@@ -40,9 +41,10 @@ driver(drivers/w1/slaves/w1_bq27000.c) sets the ID to 1.
Please note to load both the modules with a different ID if required, but note
that the ID used should be same for both master and slave driver loading.
e.g:
insmod omap_hdq.ko W1_ID=2
inamod w1_bq27000.ko F_ID=2
e.g::
insmod omap_hdq.ko W1_ID=2
inamod w1_bq27000.ko F_ID=2
The driver also supports 1-wire mode. In this mode, there is no need to
pass slave ID as parameter. The driver will auto-detect slaves connected

View File

@@ -1,3 +1,4 @@
=====================
Kernel driver w1-gpio
=====================
@@ -16,28 +17,30 @@ Documentation/devicetree/bindings/w1/w1-gpio.txt
Example (mach-at91)
-------------------
#include <linux/gpio/machine.h>
#include <linux/w1-gpio.h>
::
static struct gpiod_lookup_table foo_w1_gpiod_table = {
#include <linux/gpio/machine.h>
#include <linux/w1-gpio.h>
static struct gpiod_lookup_table foo_w1_gpiod_table = {
.dev_id = "w1-gpio",
.table = {
GPIO_LOOKUP_IDX("at91-gpio", AT91_PIN_PB20, NULL, 0,
GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN),
},
};
};
static struct w1_gpio_platform_data foo_w1_gpio_pdata = {
static struct w1_gpio_platform_data foo_w1_gpio_pdata = {
.ext_pullup_enable_pin = -EINVAL,
};
};
static struct platform_device foo_w1_device = {
static struct platform_device foo_w1_device = {
.name = "w1-gpio",
.id = -1,
.dev.platform_data = &foo_w1_gpio_pdata,
};
};
...
...
at91_set_GPIO_periph(foo_w1_gpio_pdata.pin, 1);
at91_set_multi_drive(foo_w1_gpio_pdata.pin, 1);
gpiod_add_lookup_table(&foo_w1_gpiod_table);