linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
To: Linux Doc Mailing List <linux-doc@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	linux-kernel@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Kamil Debski <kamil@wypas.org>,
	Sylwester Nawrocki <s.nawrocki@samsung.com>
Subject: [PATCH v2 15/29] docs: phy: convert samsung-usb2.txt to ReST format
Date: Tue, 18 Jun 2019 17:53:33 -0300	[thread overview]
Message-ID: <40e5746fd7107126240929130ce403f7cdc2b9e2.1560890800.git.mchehab+samsung@kernel.org> (raw)
In-Reply-To: <cover.1560890800.git.mchehab+samsung@kernel.org>

In order to merge it into a Sphinx book, we need first to
convert to ReST.

While this is not part of any book, mark it as :orphan:, in order
to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 .../{samsung-usb2.txt => samsung-usb2.rst}    | 62 ++++++++++---------
 MAINTAINERS                                   |  2 +-
 2 files changed, 34 insertions(+), 30 deletions(-)
 rename Documentation/phy/{samsung-usb2.txt => samsung-usb2.rst} (77%)

diff --git a/Documentation/phy/samsung-usb2.txt b/Documentation/phy/samsung-usb2.rst
similarity index 77%
rename from Documentation/phy/samsung-usb2.txt
rename to Documentation/phy/samsung-usb2.rst
index ed12d437189d..98b5952fcb97 100644
--- a/Documentation/phy/samsung-usb2.txt
+++ b/Documentation/phy/samsung-usb2.rst
@@ -1,9 +1,11 @@
-.------------------------------------------------------------------------------+
-|			Samsung USB 2.0 PHY adaptation layer		       |
-+-----------------------------------------------------------------------------+'
+:orphan:
 
-| 1. Description
-+----------------
+====================================
+Samsung USB 2.0 PHY adaptation layer
+====================================
+
+1. Description
+--------------
 
 The architecture of the USB 2.0 PHY module in Samsung SoCs is similar
 among many SoCs. In spite of the similarities it proved difficult to
@@ -14,8 +16,8 @@ the PHY powering up process had to be altered. This adaptation layer is
 a compromise between having separate drivers and having a single driver
 with added support for many special cases.
 
-| 2. Files description
-+----------------------
+2. Files description
+--------------------
 
 - phy-samsung-usb2.c
    This is the main file of the adaptation layer. This file contains
@@ -32,44 +34,45 @@ with added support for many special cases.
    driver. In addition it should contain extern declarations for
    structures that describe particular SoCs.
 
-| 3. Supporting SoCs
-+--------------------
+3. Supporting SoCs
+------------------
 
 To support a new SoC a new file should be added to the drivers/phy
 directory. Each SoC's configuration is stored in an instance of the
-struct samsung_usb2_phy_config.
+struct samsung_usb2_phy_config::
 
-struct samsung_usb2_phy_config {
+  struct samsung_usb2_phy_config {
 	const struct samsung_usb2_common_phy *phys;
 	int (*rate_to_clk)(unsigned long, u32 *);
 	unsigned int num_phys;
 	bool has_mode_switch;
-};
+  };
 
-The num_phys is the number of phys handled by the driver. *phys is an
+The num_phys is the number of phys handled by the driver. `*phys` is an
 array that contains the configuration for each phy. The has_mode_switch
 property is a boolean flag that determines whether the SoC has USB host
 and device on a single pair of pins. If so, a special register has to
 be modified to change the internal routing of these pins between a USB
 device or host module.
 
-For example the configuration for Exynos 4210 is following:
+For example the configuration for Exynos 4210 is following::
 
-const struct samsung_usb2_phy_config exynos4210_usb2_phy_config = {
+  const struct samsung_usb2_phy_config exynos4210_usb2_phy_config = {
 	.has_mode_switch        = 0,
 	.num_phys		= EXYNOS4210_NUM_PHYS,
 	.phys			= exynos4210_phys,
 	.rate_to_clk		= exynos4210_rate_to_clk,
-}
+  }
+
+- `int (*rate_to_clk)(unsigned long, u32 *)`
 
-- int (*rate_to_clk)(unsigned long, u32 *)
 	The rate_to_clk callback is to convert the rate of the clock
 	used as the reference clock for the PHY module to the value
 	that should be written in the hardware register.
 
-The exynos4210_phys configuration array is as follows:
+The exynos4210_phys configuration array is as follows::
 
-static const struct samsung_usb2_common_phy exynos4210_phys[] = {
+  static const struct samsung_usb2_common_phy exynos4210_phys[] = {
 	{
 		.label		= "device",
 		.id		= EXYNOS4210_DEVICE,
@@ -95,29 +98,30 @@ static const struct samsung_usb2_common_phy exynos4210_phys[] = {
 		.power_off	= exynos4210_power_off,
 	},
 	{},
-};
+  };
+
+- `int (*power_on)(struct samsung_usb2_phy_instance *);`
+  `int (*power_off)(struct samsung_usb2_phy_instance *);`
 
-- int (*power_on)(struct samsung_usb2_phy_instance *);
-- int (*power_off)(struct samsung_usb2_phy_instance *);
 	These two callbacks are used to power on and power off the phy
 	by modifying appropriate registers.
 
 Final change to the driver is adding appropriate compatible value to the
 phy-samsung-usb2.c file. In case of Exynos 4210 the following lines were
-added to the struct of_device_id samsung_usb2_phy_of_match[] array:
+added to the struct of_device_id samsung_usb2_phy_of_match[] array::
 
-#ifdef CONFIG_PHY_EXYNOS4210_USB2
+  #ifdef CONFIG_PHY_EXYNOS4210_USB2
 	{
 		.compatible = "samsung,exynos4210-usb2-phy",
 		.data = &exynos4210_usb2_phy_config,
 	},
-#endif
+  #endif
 
 To add further flexibility to the driver the Kconfig file enables to
 include support for selected SoCs in the compiled driver. The Kconfig
-entry for Exynos 4210 is following:
+entry for Exynos 4210 is following::
 
-config PHY_EXYNOS4210_USB2
+  config PHY_EXYNOS4210_USB2
 	bool "Support for Exynos 4210"
 	depends on PHY_SAMSUNG_USB2
 	depends on CPU_EXYNOS4210
@@ -128,8 +132,8 @@ config PHY_EXYNOS4210_USB2
 	  phys are available - device, host, HSCI0 and HSCI1.
 
 The newly created file that supports the new SoC has to be also added to the
-Makefile. In case of Exynos 4210 the added line is following:
+Makefile. In case of Exynos 4210 the added line is following::
 
-obj-$(CONFIG_PHY_EXYNOS4210_USB2)       += phy-exynos4210-usb2.o
+  obj-$(CONFIG_PHY_EXYNOS4210_USB2)       += phy-exynos4210-usb2.o
 
 After completing these steps the support for the new SoC should be ready.
diff --git a/MAINTAINERS b/MAINTAINERS
index 9958d322e355..8941a73880e6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13966,7 +13966,7 @@ M:	Sylwester Nawrocki <s.nawrocki@samsung.com>
 L:	linux-kernel@vger.kernel.org
 S:	Supported
 F:	Documentation/devicetree/bindings/phy/samsung-phy.txt
-F:	Documentation/phy/samsung-usb2.txt
+F:	Documentation/phy/samsung-usb2.rst
 F:	drivers/phy/samsung/phy-exynos4210-usb2.c
 F:	drivers/phy/samsung/phy-exynos4x12-usb2.c
 F:	drivers/phy/samsung/phy-exynos5250-usb2.c
-- 
2.21.0


  parent reply	other threads:[~2019-06-18 20:55 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1560890771.git.mchehab+samsung@kernel.org>
     [not found] ` <b0d24e805d5368719cc64e8104d64ee9b5b89dd0.1560890772.git.mchehab+samsung@kernel.org>
2019-06-18 20:53   ` [PATCH v2 00/29] Convert files to ReST - part 2 Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 01/29] docs: connector: convert to ReST and rename to connector.rst Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 02/29] docs: lcd-panel-cgram.txt: convert docs to ReST and rename to *.rst Mauro Carvalho Chehab
2019-06-18 21:14       ` Miguel Ojeda
2019-06-18 23:14         ` Mauro Carvalho Chehab
2019-06-20  8:37           ` Miguel Ojeda
2019-06-18 20:53     ` [PATCH v2 03/29] docs: lp855x-driver.txt: convert to ReST and move to kernel-api Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 04/29] docs: m68k: convert docs to ReST and rename to *.rst Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 05/29] docs: cma/debugfs.txt: " Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 06/29] docs: console.txt: " Mauro Carvalho Chehab
2019-06-21 13:48       ` Greg Kroah-Hartman
2019-06-18 20:53     ` [PATCH v2 07/29] docs: pti_intel_mid.txt: convert it to pti_intel_mid.rst Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 08/29] docs: early-userspace: convert docs to ReST and rename to *.rst Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 09/29] docs: driver-model: " Mauro Carvalho Chehab
2019-06-21 13:47       ` Greg Kroah-Hartman
2019-06-18 20:53     ` [PATCH v2 11/29] docs: memory-devices: convert ti-emif.txt to ReST Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 12/29] docs: xen-tpmfront.txt: convert it to .rst Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 13/29] docs: bus-devices: ti-gpmc.rst: convert it to ReST Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 14/29] docs: nvmem: convert docs to ReST and rename to *.rst Mauro Carvalho Chehab
2019-06-18 20:53     ` Mauro Carvalho Chehab [this message]
2019-06-18 20:53     ` [PATCH v2 16/29] docs: rbtree.txt: fix Sphinx build warnings Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 17/29] docs: DMA-API-HOWTO.txt: fix an unmarked code block Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 18/29] docs: accounting: convert to ReST Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 19/29] docs: ia64: " Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 20/29] docs: leds: " Mauro Carvalho Chehab
2019-06-21 10:59       ` Pavel Machek
2019-06-18 20:53     ` [PATCH v2 21/29] docs: laptops: " Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 22/29] docs: iio: " Mauro Carvalho Chehab
2019-06-22  9:43       ` Jonathan Cameron
2019-06-18 20:53     ` [PATCH v2 23/29] docs: namespaces: " Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 24/29] docs: nfc: " Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 25/29] docs: md: " Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 26/29] docs: mtd: " Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 27/29] docs: nvdimm: " Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 28/29] docs: xtensa: " Mauro Carvalho Chehab
2019-06-18 20:53     ` [PATCH v2 29/29] docs: mmc: " Mauro Carvalho Chehab
     [not found]   ` <20190619114356.GP3419@hirez.programming.kicks-ass.net>
2019-06-19 13:19     ` [PATCH v1 12/22] docs: driver-api: add .rst files from the main dir Mauro Carvalho Chehab
2019-06-19 21:27       ` Peter Zijlstra
2019-06-20  2:24         ` Mauro Carvalho Chehab
     [not found]   ` <CAKMK7uGM1aZz9yg1kYM8w2gw_cS6Eaynmar-uVurXjK5t6WouQ@mail.gmail.com>
     [not found]     ` <20190619072218.4437f891@coco.lan>
     [not found]       ` <20190619104239.GM3419@hirez.programming.kicks-ass.net>
2019-06-19 13:04         ` Mauro Carvalho Chehab
     [not found]         ` <20190619081353.75762028@lwn.net>
2019-06-19 15:02           ` Mauro Carvalho Chehab
2019-06-19 13:39     ` David Howells
2019-06-19 14:15       ` Mauro Carvalho Chehab
2019-06-19 14:54         ` Jonathan Corbet
2019-06-19 15:52           ` Jani Nikula
2019-06-19 15:54           ` Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40e5746fd7107126240929130ce403f7cdc2b9e2.1560890800.git.mchehab+samsung@kernel.org \
    --to=mchehab+samsung@kernel.org \
    --cc=corbet@lwn.net \
    --cc=kamil@wypas.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=s.nawrocki@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).