1
0
Fork 0

docs: driver-model: move it to the driver-api book

The audience for the Kernel driver-model is clearly Kernel hackers.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> # ice driver changes
alistair/sunxi64-5.4-dsi
Mauro Carvalho Chehab 2019-06-18 12:34:59 -03:00
parent 56198359b6
commit fe34c89d25
24 changed files with 16 additions and 17 deletions

View File

@ -1,5 +1,3 @@
:orphan:
============ ============
Driver Model Driver Model
============ ============

View File

@ -9,7 +9,7 @@ Patrick Mochel
Overview Overview
Please refer to `Documentation/driver-model/*.rst` for definitions of Please refer to `Documentation/driver-api/driver-model/*.rst` for definitions of
various driver types and concepts. various driver types and concepts.
Most of the work of porting devices drivers to the new model happens Most of the work of porting devices drivers to the new model happens

View File

@ -399,7 +399,7 @@ symbol:
will pass the struct gpio_chip* for the chip to all IRQ callbacks, so the will pass the struct gpio_chip* for the chip to all IRQ callbacks, so the
callbacks need to embed the gpio_chip in its state container and obtain a callbacks need to embed the gpio_chip in its state container and obtain a
pointer to the container using container_of(). pointer to the container using container_of().
(See Documentation/driver-model/design-patterns.rst) (See Documentation/driver-api/driver-model/design-patterns.rst)
- gpiochip_irqchip_add_nested(): adds a nested cascaded irqchip to a gpiochip, - gpiochip_irqchip_add_nested(): adds a nested cascaded irqchip to a gpiochip,
as discussed above regarding different types of cascaded irqchips. The as discussed above regarding different types of cascaded irqchips. The

View File

@ -14,6 +14,7 @@ available subsections can be seen below.
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
driver-model/index
basics basics
infrastructure infrastructure
early-userspace/index early-userspace/index

View File

@ -103,7 +103,7 @@ id_table an array of NULL terminated EISA id strings,
(driver_data). (driver_data).
driver a generic driver, such as described in driver a generic driver, such as described in
Documentation/driver-model/driver.rst. Only .name, Documentation/driver-api/driver-model/driver.rst. Only .name,
.probe and .remove members are mandatory. .probe and .remove members are mandatory.
=============== ==================================================== =============== ====================================================
@ -152,7 +152,7 @@ state set of flags indicating the state of the device. Current
flags are EISA_CONFIG_ENABLED and EISA_CONFIG_FORCED. flags are EISA_CONFIG_ENABLED and EISA_CONFIG_FORCED.
res set of four 256 bytes I/O regions allocated to this device res set of four 256 bytes I/O regions allocated to this device
dma_mask DMA mask set from the parent device. dma_mask DMA mask set from the parent device.
dev generic device (see Documentation/driver-model/device.rst) dev generic device (see Documentation/driver-api/driver-model/device.rst)
======== ============================================================ ======== ============================================================
You can get the 'struct eisa_device' from 'struct device' using the You can get the 'struct eisa_device' from 'struct device' using the

View File

@ -319,7 +319,7 @@ quick way to lookup the sysfs interface for a device from the result of
a stat(2) operation. a stat(2) operation.
More information can driver-model specific features can be found in More information can driver-model specific features can be found in
Documentation/driver-model/. Documentation/driver-api/driver-model/.
TODO: Finish this section. TODO: Finish this section.

View File

@ -89,7 +89,7 @@ increase the chances of your change being accepted.
console. Excessive logging can seriously affect system performance. console. Excessive logging can seriously affect system performance.
* Use devres functions whenever possible to allocate resources. For rationale * Use devres functions whenever possible to allocate resources. For rationale
and supported functions, please see Documentation/driver-model/devres.rst. and supported functions, please see Documentation/driver-api/driver-model/devres.rst.
If a function is not supported by devres, consider using devm_add_action(). If a function is not supported by devres, consider using devm_add_action().
* If the driver has a detect function, make sure it is silent. Debug messages * If the driver has a detect function, make sure it is silent. Debug messages

View File

@ -288,7 +288,7 @@ dev/ 包含两个子目录: char/ 和 block/。在这两个子目录中,有
中相应的设备。/sys/dev 提供一个通过一个 stat(2) 操作结果,查找 中相应的设备。/sys/dev 提供一个通过一个 stat(2) 操作结果,查找
设备 sysfs 接口快捷的方法。 设备 sysfs 接口快捷的方法。
更多有关 driver-model 的特性信息可以在 Documentation/driver-model/ 更多有关 driver-model 的特性信息可以在 Documentation/driver-api/driver-model/
中找到。 中找到。

View File

@ -5,7 +5,7 @@
* Copyright (c) 2002-3 Patrick Mochel * Copyright (c) 2002-3 Patrick Mochel
* Copyright (c) 2002-3 Open Source Development Labs * Copyright (c) 2002-3 Open Source Development Labs
* *
* Please see Documentation/driver-model/platform.rst for more * Please see Documentation/driver-api/driver-model/platform.rst for more
* information. * information.
*/ */

View File

@ -41,7 +41,7 @@ MODULE_PARM_DESC(mask, "GPIO channel mask.");
/* /*
* FIXME: convert this singleton driver to use the state container * FIXME: convert this singleton driver to use the state container
* design pattern, see Documentation/driver-model/design-patterns.rst * design pattern, see Documentation/driver-api/driver-model/design-patterns.rst
*/ */
static struct cs5535_gpio_chip { static struct cs5535_gpio_chip {
struct gpio_chip chip; struct gpio_chip chip;

View File

@ -2286,7 +2286,7 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)
struct ice_hw *hw; struct ice_hw *hw;
int err; int err;
/* this driver uses devres, see Documentation/driver-model/devres.rst */ /* this driver uses devres, see Documentation/driver-api/driver-model/devres.rst */
err = pcim_enable_device(pdev); err = pcim_enable_device(pdev);
if (err) if (err)
return err; return err;

View File

@ -15,7 +15,7 @@ normally be unsharable, specifically:
* visorinput - keyboard and mouse * visorinput - keyboard and mouse
These drivers conform to the standard Linux bus/device model described These drivers conform to the standard Linux bus/device model described
within Documentation/driver-model/, and utilize a driver named visorbus to within Documentation/driver-api/driver-model/, and utilize a driver named visorbus to
present the virtual busses involved. Drivers in the 'visor*' driver set are present the virtual busses involved. Drivers in the 'visor*' driver set are
commonly referred to as "guest drivers" or "client drivers". All drivers commonly referred to as "guest drivers" or "client drivers". All drivers
except visorbus expose a device of a specific usable class to the Linux guest except visorbus expose a device of a specific usable class to the Linux guest
@ -141,7 +141,7 @@ called automatically by the visorbus driver at appropriate times:
----------------------------------- -----------------------------------
Because visorbus is a standard Linux bus driver in the model described in Because visorbus is a standard Linux bus driver in the model described in
Documentation/driver-model/, the hierarchy of s-Par virtual devices is Documentation/driver-api/driver-model/, the hierarchy of s-Par virtual devices is
published in the sysfs tree beneath /bus/visorbus/, e.g., published in the sysfs tree beneath /bus/visorbus/, e.g.,
/sys/bus/visorbus/devices/ might look like: /sys/bus/visorbus/devices/ might look like:

View File

@ -6,7 +6,7 @@
* Copyright (c) 2004-2009 Greg Kroah-Hartman <gregkh@suse.de> * Copyright (c) 2004-2009 Greg Kroah-Hartman <gregkh@suse.de>
* Copyright (c) 2008-2009 Novell Inc. * Copyright (c) 2008-2009 Novell Inc.
* *
* See Documentation/driver-model/ for more information. * See Documentation/driver-api/driver-model/ for more information.
*/ */
#ifndef _DEVICE_H_ #ifndef _DEVICE_H_

View File

@ -4,7 +4,7 @@
* *
* Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org> * Copyright (c) 2001-2003 Patrick Mochel <mochel@osdl.org>
* *
* See Documentation/driver-model/ for more information. * See Documentation/driver-api/driver-model/ for more information.
*/ */
#ifndef _PLATFORM_DEVICE_H_ #ifndef _PLATFORM_DEVICE_H_

View File

@ -3,7 +3,7 @@
/// functions. Values allocated using the devm_functions are freed when /// functions. Values allocated using the devm_functions are freed when
/// the device is detached, and thus the use of the standard freeing /// the device is detached, and thus the use of the standard freeing
/// function would cause a double free. /// function would cause a double free.
/// See Documentation/driver-model/devres.rst for more information. /// See Documentation/driver-api/driver-model/devres.rst for more information.
/// ///
/// A difficulty of detecting this problem is that the standard freeing /// A difficulty of detecting this problem is that the standard freeing
/// function might be called from a different function than the one /// function might be called from a different function than the one