Linux-Aspeed Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ARM: dts: aspeed: Add Power9 and Power9 CFAM description
From: Joel Stanley @ 2019-04-04  4:43 UTC (permalink / raw)
  To: linux-aspeed

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

To be used by the OpenPower BMC machines.

This provides proper chip IDs but also adds the various sub-devices
necessary for the future OCC driver among other. All the added nodes
comply with the existing upstream FSI bindings.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
v2: The first version of this used a bit more magic and was nak'd by
Olof. I've reworked it to not use macros. It still needs to be included
in the parent device tree after the fsi node is created.

 arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts  |   2 +
 arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts |  22 ++
 arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts  |   8 +
 .../boot/dts/aspeed-bmc-opp-witherspoon.dts   |   2 +
 arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts    |   2 +
 arch/arm/boot/dts/ibm-power9-dual.dtsi        | 248 ++++++++++++++++++
 6 files changed, 284 insertions(+)
 create mode 100644 arch/arm/boot/dts/ibm-power9-dual.dtsi

diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts b/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
index 024e52a6cd0f..de95112e2a04 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
@@ -322,3 +322,5 @@
 &adc {
 	status = "okay";
 };
+
+#include "ibm-power9-dual.dtsi"
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
index b249da80fb83..b0cb34ccb135 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
@@ -347,3 +347,25 @@
 		line-name = "BMC_TPM_INT_N";
 	};
 };
+
+&fsi {
+	cfam at 0,0 {
+		reg = <0 0>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		chip-id = <0>;
+
+		scom at 1000 {
+			compatible = "ibm,fsi2pib";
+			reg = <0x1000 0x400>;
+		};
+
+		fsi_hub0: hub at 3400 {
+			compatible = "ibm,fsi-master-hub";
+			reg = <0x3400 0x400>;
+			#address-cells = <2>;
+			#size-cells = <0>;
+			no-scan-on-init;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
index 76fe994f2ba4..5a6bbb3b6640 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
@@ -296,3 +296,11 @@
 &adc {
 	status = "okay";
 };
+
+&gfx {
+     status = "okay";
+     memory-region = <&gfx_memory>;
+};
+
+#include "ibm-power9-dual.dtsi"
+
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
index ad54117c075e..a0a4a0c6bc2a 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
@@ -592,3 +592,5 @@
 &adc {
 	status = "okay";
 };
+
+#include "ibm-power9-dual.dtsi"
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
index 2c5aa90a546d..05df11cacb21 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
@@ -435,3 +435,5 @@
 &ibt {
 	status = "okay";
 };
+
+#include "ibm-power9-dual.dtsi"
diff --git a/arch/arm/boot/dts/ibm-power9-dual.dtsi b/arch/arm/boot/dts/ibm-power9-dual.dtsi
new file mode 100644
index 000000000000..2abc42eda7b0
--- /dev/null
+++ b/arch/arm/boot/dts/ibm-power9-dual.dtsi
@@ -0,0 +1,248 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright 2018 IBM Corp
+
+&fsi {
+	cfam at 0,0 {
+		reg = <0 0>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		chip-id = <0>;
+
+		scom at 1000 {
+			compatible = "ibm,fsi2pib";
+			reg = <0x1000 0x400>;
+		};
+
+		i2c at 1800 {
+			compatible = "ibm,fsi-i2c-master";
+			reg = <0x1800 0x400>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			cfam0_i2c0: i2c-bus at 0 {
+				reg = <0>;
+			};
+
+			cfam0_i2c1: i2c-bus at 1 {
+				reg = <1>;
+			};
+
+			cfam0_i2c2: i2c-bus at 2 {
+				reg = <2>;
+			};
+
+			cfam0_i2c3: i2c-bus at 3 {
+				reg = <3>;
+			};
+
+			cfam0_i2c4: i2c-bus at 4 {
+				reg = <4>;
+			};
+
+			cfam0_i2c5: i2c-bus at 5 {
+				reg = <5>;
+			};
+
+			cfam0_i2c6: i2c-bus at 6 {
+				reg = <6>;
+			};
+
+			cfam0_i2c7: i2c-bus at 7 {
+				reg = <7>;
+			};
+
+			cfam0_i2c8: i2c-bus at 8 {
+				reg = <8>;
+			};
+
+			cfam0_i2c9: i2c-bus at 9 {
+				reg = <9>;
+			};
+
+			cfam0_i2c10: i2c-bus at a {
+				reg = <10>;
+			};
+
+			cfam0_i2c11: i2c-bus at b {
+				reg = <11>;
+			};
+
+			cfam0_i2c12: i2c-bus at c {
+				reg = <12>;
+			};
+
+			cfam0_i2c13: i2c-bus at d {
+				reg = <13>;
+			};
+
+			cfam0_i2c14: i2c-bus at e {
+				reg = <14>;
+			};
+		};
+
+		sbefifo at 2400 {
+			compatible = "ibm,p9-sbefifo";
+			reg = <0x2400 0x400>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			fsi_occ0: occ {
+				compatible = "ibm,p9-occ";
+			};
+		};
+
+		fsi_hub0: hub at 3400 {
+			compatible = "fsi-master-hub";
+			reg = <0x3400 0x400>;
+			#address-cells = <2>;
+			#size-cells = <0>;
+
+			no-scan-on-init;
+		};
+	};
+};
+
+&fsi_hub0 {
+	cfam at 1,0 {
+		reg = <1 0>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		chip-id = <1>;
+
+		scom at 1000 {
+			compatible = "ibm,fsi2pib";
+			reg = <0x1000 0x400>;
+		};
+
+		i2c at 1800 {
+			compatible = "ibm,fsi-i2c-master";
+			reg = <0x1800 0x400>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			cfam1_i2c0: i2c-bus at 0 {
+				reg = <0>;
+			};
+
+			cfam1_i2c1: i2c-bus at 1 {
+				reg = <1>;
+			};
+
+			cfam1_i2c2: i2c-bus at 2 {
+				reg = <2>;
+			};
+
+			cfam1_i2c3: i2c-bus at 3 {
+				reg = <3>;
+			};
+
+			cfam1_i2c4: i2c-bus at 4 {
+				reg = <4>;
+			};
+
+			cfam1_i2c5: i2c-bus at 5 {
+				reg = <5>;
+			};
+
+			cfam1_i2c6: i2c-bus at 6 {
+				reg = <6>;
+			};
+
+			cfam1_i2c7: i2c-bus at 7 {
+				reg = <7>;
+			};
+
+			cfam1_i2c8: i2c-bus at 8 {
+				reg = <8>;
+			};
+
+			cfam1_i2c9: i2c-bus at 9 {
+				reg = <9>;
+			};
+
+			cfam1_i2c10: i2c-bus at a {
+				reg = <10>;
+			};
+
+			cfam1_i2c11: i2c-bus at b {
+				reg = <11>;
+			};
+
+			cfam1_i2c12: i2c-bus at c {
+				reg = <12>;
+			};
+
+			cfam1_i2c13: i2c-bus at d {
+				reg = <13>;
+			};
+
+			cfam1_i2c14: i2c-bus at e {
+				reg = <14>;
+			};
+		};
+
+		sbefifo at 2400 {
+			compatible = "ibm,p9-sbefifo";
+			reg = <0x2400 0x400>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			fsi_occ1: occ {
+				compatible = "ibm,p9-occ";
+			};
+		};
+
+		fsi_hub1: hub at 3400 {
+			compatible = "fsi-master-hub";
+			reg = <0x3400 0x400>;
+			#address-cells = <2>;
+			#size-cells = <0>;
+
+			no-scan-on-init;
+		};
+	};
+};
+
+/* Legacy OCC numbering (to get rid of when userspace is fixed) */
+&fsi_occ0 {
+	reg = <1>;
+};
+
+&fsi_occ1 {
+	reg = <2>;
+};
+
+/ {
+	aliases {
+		i2c100 = &cfam0_i2c0;
+		i2c101 = &cfam0_i2c1;
+		i2c102 = &cfam0_i2c2;
+		i2c103 = &cfam0_i2c3;
+		i2c104 = &cfam0_i2c4;
+		i2c105 = &cfam0_i2c5;
+		i2c106 = &cfam0_i2c6;
+		i2c107 = &cfam0_i2c7;
+		i2c108 = &cfam0_i2c8;
+		i2c109 = &cfam0_i2c9;
+		i2c110 = &cfam0_i2c10;
+		i2c111 = &cfam0_i2c11;
+		i2c112 = &cfam0_i2c12;
+		i2c113 = &cfam0_i2c13;
+		i2c114 = &cfam0_i2c14;
+		i2c200 = &cfam1_i2c0;
+		i2c201 = &cfam1_i2c1;
+		i2c202 = &cfam1_i2c2;
+		i2c203 = &cfam1_i2c3;
+		i2c204 = &cfam1_i2c4;
+		i2c205 = &cfam1_i2c5;
+		i2c206 = &cfam1_i2c6;
+		i2c207 = &cfam1_i2c7;
+		i2c208 = &cfam1_i2c8;
+		i2c209 = &cfam1_i2c9;
+		i2c210 = &cfam1_i2c10;
+		i2c211 = &cfam1_i2c11;
+		i2c212 = &cfam1_i2c12;
+		i2c213 = &cfam1_i2c13;
+		i2c214 = &cfam1_i2c14;
+	};
+};
-- 
2.20.1


^ permalink raw reply related

* [PATCH v8 2/2] drivers/misc: Add Aspeed P2A control driver
From: Patrick Venture @ 2019-04-04 14:59 UTC (permalink / raw)
  To: linux-aspeed
In-Reply-To: <CAO=notzUTffr2bGvW3fbLFKFu+SmCqG5RtkKTj-Mxr20Ssi+zw@mail.gmail.com>

On Tue, Apr 2, 2019 at 2:25 PM Patrick Venture <venture@google.com> wrote:
>
> On Mon, Apr 1, 2019 at 8:36 PM Andrew Jeffery <andrew@aj.id.au> wrote:
> >
> >
> >
> > On Thu, 28 Mar 2019, at 07:52, Patrick Venture wrote:
> > > The ASPEED AST2400, and AST2500 in some configurations include a
> > > PCI-to-AHB MMIO bridge.  This bridge allows a server to read and write
> > > in the BMC's physical address space.  This feature is especially useful
> > > when using this bridge to send large files to the BMC.
> > >
> > > The host may use this to send down a firmware image by staging data at a
> > > specific memory address, and in a coordinated effort with the BMC's
> > > software stack and kernel, transmit the bytes.
> > >
> > > This driver enables the BMC to unlock the PCI bridge on demand, and
> > > configure it via ioctl to allow the host to write bytes to an agreed
> > > upon location.  In the primary use-case, the region to use is known
> > > apriori on the BMC, and the host requests this information.  Once this
> > > request is received, the BMC's software stack will enable the bridge and
> > > the region and then using some software flow control (possibly via IPMI
> > > packets), copy the bytes down.  Once the process is complete, the BMC
> > > will disable the bridge and unset any region involved.
> > >
> > > The default behavior of this bridge when present is: enabled and all
> > > regions marked read-write.  This driver will fix the regions to be
> > > read-only and then disable the bridge entirely.
> > >
> > > The memory regions protected are:
> > >  * BMC flash MMIO window
> > >  * System flash MMIO windows
> > >  * SOC IO (peripheral MMIO)
> > >  * DRAM
> > >
> > > The DRAM region itself is all of DRAM and cannot be further specified.
> > > Once the PCI bridge is enabled, the host can read all of DRAM, and if
> > > the DRAM section is write-enabled, then it can write to all of it.
> > >
> > > Signed-off-by: Patrick Venture <venture@google.com>
> > > ---
> > > Changes for v8:
> > >  - Promoted u32 address values to u64 to be compatible with either.
> > > Changes for v7:
> > > - Moved node under the syscon node and changed therefore how it grabs
> > > the phandle for the regmap.
> > > Changes for v6:
> > > - Cleaned up documentation
> > > - Added missing machine-readable copyright lines.
> > > - Fixed over 80 chars instances.
> > > - Changed error from invalid memory-region node to ENODEV.
> > > Changes for v5:
> > > - Fixup missing exit condition and remove extra jump.
> > > Changes for v4:
> > > - Added ioctl for reading back the memory-region configuration.
> > > - Cleaned up some unused variables.
> > > Changes for v3:
> > > - Deleted unused read and write methods.
> > > Changes for v2:
> > > - Dropped unused reads.
> > > - Moved call to disable bridge to before registering device.
> > > - Switch from using regs to using a syscon regmap. <<< IN PROGRESS
> > > - Updated the commit message. <<< TODO
> > > - Updated the bit flipped for SCU180_ENP2A
> > > - Dropped boolean region_specified variable.
> > > - Renamed p2a_ctrl in _probe to misc_ctrl per suggestion.
> > > - Renamed aspeed_p2a_region_search to aspeed_p2a_region_acquire
> > > - Updated commit message.
> > > ---
> > >  drivers/misc/Kconfig                 |   8 +
> > >  drivers/misc/Makefile                |   1 +
> > >  drivers/misc/aspeed-p2a-ctrl.c       | 448 +++++++++++++++++++++++++++
> > >  include/uapi/linux/aspeed-p2a-ctrl.h |  62 ++++
> > >  4 files changed, 519 insertions(+)
> > >  create mode 100644 drivers/misc/aspeed-p2a-ctrl.c
> > >  create mode 100644 include/uapi/linux/aspeed-p2a-ctrl.h
> > >
> > > diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
> > > index 42ab8ec92a046..3209ee020b153 100644
> > > --- a/drivers/misc/Kconfig
> > > +++ b/drivers/misc/Kconfig
> > > @@ -496,6 +496,14 @@ config VEXPRESS_SYSCFG
> > >         bus. System Configuration interface is one of the possible means
> > >         of generating transactions on this bus.
> > >
> > > +config ASPEED_P2A_CTRL
> > > +     depends on (ARCH_ASPEED || COMPILE_TEST) && REGMAP && MFD_SYSCON
> > > +     tristate "Aspeed ast2400/2500 HOST P2A VGA MMIO to BMC bridge control"
> > > +     help
> > > +       Control Aspeed ast2400/2500 HOST P2A VGA MMIO to BMC mappings
> > > through
> > > +       ioctl()s, the driver also provides an interface for userspace
> > > mappings to
> > > +       a pre-defined region.
> > > +
> > >  config ASPEED_LPC_CTRL
> > >       depends on (ARCH_ASPEED || COMPILE_TEST) && REGMAP && MFD_SYSCON
> > >       tristate "Aspeed ast2400/2500 HOST LPC to BMC bridge control"
> > > diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
> > > index d5b7d3404dc78..c36239573a5ca 100644
> > > --- a/drivers/misc/Makefile
> > > +++ b/drivers/misc/Makefile
> > > @@ -56,6 +56,7 @@ obj-$(CONFIG_VEXPRESS_SYSCFG)       += vexpress-syscfg.o
> > >  obj-$(CONFIG_CXL_BASE)               += cxl/
> > >  obj-$(CONFIG_ASPEED_LPC_CTRL)        += aspeed-lpc-ctrl.o
> > >  obj-$(CONFIG_ASPEED_LPC_SNOOP)       += aspeed-lpc-snoop.o
> > > +obj-$(CONFIG_ASPEED_P2A_CTRL)        += aspeed-p2a-ctrl.o
> > >  obj-$(CONFIG_PCI_ENDPOINT_TEST)      += pci_endpoint_test.o
> > >  obj-$(CONFIG_OCXL)           += ocxl/
> > >  obj-y                                += cardreader/
> > > diff --git a/drivers/misc/aspeed-p2a-ctrl.c
> > > b/drivers/misc/aspeed-p2a-ctrl.c
> > > new file mode 100644
> > > index 0000000000000..06afbfe51a279
> > > --- /dev/null
> > > +++ b/drivers/misc/aspeed-p2a-ctrl.c
> > > @@ -0,0 +1,448 @@
> > > +// SPDX-License-Identifier: GPL-2.0+
> > > +/*
> > > + * Copyright 2019 Google Inc
> > > + *
> > > + * This program is free software; you can redistribute it and/or
> > > + * modify it under the terms of the GNU General Public License
> > > + * as published by the Free Software Foundation; either version
> > > + * 2 of the License, or (at your option) any later version.
> > > + *
> > > + * Provides a simple driver to control the ASPEED P2A interface which
> > > allows
> > > + * the host to read and write to various regions of the BMC's memory.
> > > + */
> > > +
> > > +#include <linux/fs.h>
> > > +#include <linux/io.h>
> > > +#include <linux/mfd/syscon.h>
> > > +#include <linux/miscdevice.h>
> > > +#include <linux/mm.h>
> > > +#include <linux/module.h>
> > > +#include <linux/mutex.h>
> > > +#include <linux/of_address.h>
> > > +#include <linux/of_device.h>
> > > +#include <linux/platform_device.h>
> > > +#include <linux/regmap.h>
> > > +#include <linux/slab.h>
> > > +#include <linux/uaccess.h>
> > > +
> > > +#include <linux/aspeed-p2a-ctrl.h>
> > > +
> > > +#define DEVICE_NAME  "aspeed-p2a-ctrl"
> > > +
> > > +/* SCU2C is a Misc. Control Register. */
> > > +#define SCU2C 0x2c
> > > +/* SCU180 is the PCIe Configuration Setting Control Register. */
> > > +#define SCU180 0x180
> > > +/* Bit 1 controls the P2A bridge, while bit 0 controls the entire VGA
> > > device
> > > + * on the PCI bus.
> > > + */
> > > +#define SCU180_ENP2A BIT(1)
> > > +
> > > +/* The ast2400/2500 both have six ranges. */
> > > +#define P2A_REGION_COUNT 6
> > > +
> > > +struct region {
> > > +     u64 min;
> > > +     u64 max;
> > > +     u32 bit;
> > > +};
> > > +
> > > +struct aspeed_p2a_model_data {
> > > +     /* min, max, bit */
> > > +     struct region regions[P2A_REGION_COUNT];
> > > +};
> > > +
> > > +struct aspeed_p2a_ctrl {
> > > +     struct miscdevice miscdev;
> > > +     struct regmap *regmap;
> > > +
> > > +     const struct aspeed_p2a_model_data *config;
> > > +
> > > +     /* Access to these needs to be locked, held via probe, mapping ioctl,
> > > +      * and release, remove.
> > > +      */
> > > +     struct mutex tracking;
> > > +     u32 readers;
> > > +     u32 readerwriters[P2A_REGION_COUNT];
> > > +
> > > +     phys_addr_t mem_base;
> > > +     resource_size_t mem_size;
> > > +};
> > > +
> > > +struct aspeed_p2a_user {
> > > +     struct file *file;
> > > +     struct aspeed_p2a_ctrl *parent;
> > > +
> > > +     /* The entire memory space is opened for reading once the bridge is
> > > +      * enabled, therefore this needs only to be tracked once per user.
> > > +      * If any user has it open for read, the bridge must stay enabled.
> > > +      */
> > > +     u32 read;
> > > +
> > > +     /* Each entry of the array corresponds to a P2A Region.  If the user
> > > +      * opens for read or readwrite, the reference goes up here.  On
> > > +      * release, this array is walked and references adjusted accordingly.
> > > +      */
> > > +     u32 readwrite[P2A_REGION_COUNT];
> > > +};
> > > +
> > > +static void aspeed_p2a_enable_bridge(struct aspeed_p2a_ctrl *p2a_ctrl)
> > > +{
> > > +     regmap_update_bits(p2a_ctrl->regmap,
> > > +             SCU180, SCU180_ENP2A, SCU180_ENP2A);
> > > +}
> > > +
> > > +static void aspeed_p2a_disable_bridge(struct aspeed_p2a_ctrl *p2a_ctrl)
> > > +{
> > > +     regmap_update_bits(p2a_ctrl->regmap, SCU180, SCU180_ENP2A, 0);
> > > +}
> > > +
> > > +static int aspeed_p2a_mmap(struct file *file, struct vm_area_struct
> > > *vma)
> > > +{
> > > +     struct aspeed_p2a_user *priv = file->private_data;
> > > +     struct aspeed_p2a_ctrl *ctrl = priv->parent;
> > > +
> > > +     if (ctrl->mem_base == 0 && ctrl->mem_size == 0)
> > > +             return -EINVAL;
> > > +
> > > +     unsigned long vsize = vma->vm_end - vma->vm_start;
> > > +     pgprot_t prot = vma->vm_page_prot;
> > > +
> > > +     if (vma->vm_pgoff + vsize > ctrl->mem_base + ctrl->mem_size)
> > > +             return -EINVAL;
> > > +
> > > +     /* ast2400/2500 AHB accesses are not cache coherent */
> > > +     prot = pgprot_noncached(prot);
> > > +
> > > +     if (remap_pfn_range(vma, vma->vm_start,
> > > +             (ctrl->mem_base >> PAGE_SHIFT) + vma->vm_pgoff,
> > > +             vsize, prot))
> > > +             return -EAGAIN;
> > > +
> > > +     return 0;
> > > +}
> > > +
> > > +static bool aspeed_p2a_region_acquire(struct aspeed_p2a_user *priv,
> > > +             struct aspeed_p2a_ctrl *ctrl,
> > > +             struct aspeed_p2a_ctrl_mapping *map)
> > > +{
> > > +     int i;
> > > +     u64 base, end;
> > > +     bool matched = false;
> > > +
> > > +     base = map->addr;
> > > +     end = map->addr + (map->length - 1);
> > > +
> > > +     /* If the value is a legal u32, it will find a match. */
> > > +     for (i = 0; i < P2A_REGION_COUNT; i++) {
> > > +             const struct region *curr = &ctrl->config->regions[i];
> > > +
> > > +             /* If the top of this region is lower than your base, skip it.
> > > +              */
> > > +             if (curr->max < base)
> > > +                     continue;
> > > +
> > > +             /* If the bottom of this region is higher than your end, bail.
> > > +              */
> > > +             if (curr->min > end)
> > > +                     break;
> > > +
> > > +             /* Lock this and update it, therefore it someone else is
> > > +              * closing their file out, this'll preserve the increment.
> > > +              */
> > > +             mutex_lock(&ctrl->tracking);
> > > +             ctrl->readerwriters[i] += 1;
> > > +             mutex_unlock(&ctrl->tracking);
> > > +
> > > +             /* Track with the user, so when they close their file, we can
> > > +              * decrement properly.
> > > +              */
> > > +             priv->readwrite[i] += 1;
> > > +
> > > +             /* Enable the region as read-write. */
> > > +             regmap_update_bits(ctrl->regmap, SCU2C, curr->bit, 0);
> > > +             matched = true;
> > > +     }
> > > +
> > > +     return matched;
> > > +}
> > > +
> > > +static long aspeed_p2a_ioctl(struct file *file, unsigned int cmd,
> > > +             unsigned long data)
> > > +{
> > > +     struct aspeed_p2a_user *priv = file->private_data;
> > > +     struct aspeed_p2a_ctrl *ctrl = priv->parent;
> > > +     void __user *arg = (void __user *)data;
> > > +     struct aspeed_p2a_ctrl_mapping map;
> > > +
> > > +     if (copy_from_user(&map, arg, sizeof(map)))
> > > +             return -EFAULT;
> > > +
> > > +     switch (cmd) {
> > > +     case ASPEED_P2A_CTRL_IOCTL_SET_WINDOW:
> > > +             /* If they want a region to be read-only, since the entire
> > > +              * region is read-only once enabled, we just need to track this
> > > +              * user wants to read from the bridge, and if it's not enabled.
> > > +              * Enable it.
> > > +              */
> > > +             if (map.flags == ASPEED_P2A_CTRL_READ_ONLY) {
> > > +                     mutex_lock(&ctrl->tracking);
> > > +                     ctrl->readers += 1;
> > > +                     mutex_unlock(&ctrl->tracking);
> > > +
> > > +                     /* Track with the user, so when they close their file,
> > > +                      * we can decrement properly.
> > > +                      */
> > > +                     priv->read += 1;
> > > +             } else if (map.flags == ASPEED_P2A_CTRL_READWRITE) {
> > > +                     /* If we don't acquire any region return error. */
> > > +                     if (!aspeed_p2a_region_acquire(priv, ctrl, &map)) {
> > > +                             return -EINVAL;
> > > +                     }
> > > +             } else {
> > > +                     /* Invalid map flags. */
> > > +                     return -EINVAL;
> > > +             }
> > > +
> > > +             aspeed_p2a_enable_bridge(ctrl);
> > > +             return 0;
> > > +     case ASPEED_P2A_CTRL_IOCTL_GET_MEMORY_CONFIG:
> > > +             /* This is a request for the memory-region and corresponding
> > > +              * length that is used by the driver for mmap.
> > > +              */
> > > +
> > > +             map.flags = 0;
> > > +             map.addr = ctrl->mem_base;
> > > +             map.length = ctrl->mem_size;
> > > +
> > > +             return copy_to_user(arg, &map, sizeof(map)) ? -EFAULT : 0;
> > > +     }
> > > +
> > > +     return -EINVAL;
> > > +}
> > > +
> > > +
> > > +/*
> > > + * When a user opens this file, we create a structure to track their
> > > mappings.
> > > + *
> > > + * A user can map a region as read-only (bridge enabled), or
> > > read-write (bit
> > > + * flipped, and bridge enabled).  Either way, this tracking is used,
> > > s.t. when
> > > + * they release the device references are handled.
> > > + *
> > > + * The bridge is not enabled until a user calls an ioctl to map a
> > > region,
> > > + * simply opening the device does not enable it.
> > > + */
> > > +static int aspeed_p2a_open(struct inode *inode, struct file *file)
> > > +{
> > > +     struct aspeed_p2a_user *priv;
> > > +
> > > +     priv = kmalloc(sizeof(*priv), GFP_KERNEL);
> > > +     if (!priv)
> > > +             return -ENOMEM;
> > > +
> > > +     priv->file = file;
> > > +     priv->read = 0;
> > > +     memset(priv->readwrite, 0, sizeof(priv->readwrite));
> > > +
> > > +     /* The file's private_data is initialized to the p2a_ctrl. */
> > > +     priv->parent = file->private_data;
> > > +
> > > +     /* Set the file's private_data to the user's data. */
> > > +     file->private_data = priv;
> > > +
> > > +     return 0;
> > > +}
> > > +
> > > +/*
> > > + * This will close the users mappings.  It will go through what they
> > > had opened
> > > + * for readwrite, and decrement those counts.  If at the end, this is
> > > the last
> > > + * user, it'll close the bridge.
> > > + */
> > > +static int aspeed_p2a_release(struct inode *inode, struct file *file)
> > > +{
> > > +     int i;
> > > +     u32 value;
> > > +     u32 bits = 0;
> > > +     bool open_regions = false;
> > > +     struct aspeed_p2a_user *priv = file->private_data;
> > > +
> > > +     /* Lock others from changing these values until everything is updated
> > > +      * in one pass.
> > > +      */
> > > +     mutex_lock(&priv->parent->tracking);
> > > +
> > > +     priv->parent->readers -= priv->read;
> > > +
> > > +     for (i = 0; i < P2A_REGION_COUNT; i++) {
> > > +             priv->parent->readerwriters[i] -= priv->readwrite[i];
> > > +
> > > +             if (priv->parent->readerwriters[i] > 0)
> > > +                     open_regions = true;
> > > +             else
> > > +                     bits |= priv->parent->config->regions[i].bit;
> > > +     }
> > > +
> > > +     /* Setting a bit to 1 disables the region, so let's just OR with the
> > > +      * above to disable any.
> > > +      */
> > > +
> > > +     /* Note, if another user is trying to ioctl, they can't grab tracking,
> > > +      * and therefore can't grab either register mutex.
> > > +      * If another user is trying to close, they can't grab tracking
> > > either.
> > > +      */
> > > +     regmap_update_bits(priv->parent->regmap, SCU2C, bits, bits);
> > > +
> > > +     /* If parent->readers is zero and open windows is 0, disable the
> > > +      * bridge.
> > > +      */
> > > +     if (!open_regions && priv->parent->readers == 0)
> > > +             aspeed_p2a_disable_bridge(priv->parent);
> > > +
> > > +     mutex_unlock(&priv->parent->tracking);
> > > +
> > > +     kfree(priv);
> > > +
> > > +     return 0;
> > > +}
> > > +
> > > +static const struct file_operations aspeed_p2a_ctrl_fops = {
> > > +     .owner = THIS_MODULE,
> > > +     .mmap = aspeed_p2a_mmap,
> > > +     .unlocked_ioctl = aspeed_p2a_ioctl,
> > > +     .open = aspeed_p2a_open,
> > > +     .release = aspeed_p2a_release,
> > > +};
> > > +
> > > +/* The regions are controlled by SCU2C */
> > > +static void aspeed_p2a_disable_all(struct aspeed_p2a_ctrl *p2a_ctrl)
> > > +{
> > > +     int i;
> > > +     u32 value = 0;
> > > +
> > > +     for (i = 0; i < P2A_REGION_COUNT; i++)
> > > +             value |= p2a_ctrl->config->regions[i].bit;
> > > +
> > > +     regmap_update_bits(p2a_ctrl->regmap, SCU2C, value, value);
> > > +
> > > +     /* Disable the bridge. */
> > > +     aspeed_p2a_disable_bridge(p2a_ctrl);
> > > +}
> > > +
> > > +static int aspeed_p2a_ctrl_probe(struct platform_device *pdev)
> > > +{
> > > +     struct aspeed_p2a_ctrl *misc_ctrl;
> > > +     struct device *dev;
> > > +     struct resource *res, resm;
> > > +     struct device_node *node;
> > > +     int rc = 0;
> > > +
> > > +     dev = &pdev->dev;
> > > +
> > > +     misc_ctrl = devm_kzalloc(dev, sizeof(*misc_ctrl), GFP_KERNEL);
> > > +     if (!misc_ctrl)
> > > +             return -ENOMEM;
> > > +
> > > +     mutex_init(&misc_ctrl->tracking);
> > > +     misc_ctrl->readers = 0;
> > > +     memset(misc_ctrl->readerwriters, 0, sizeof(misc_ctrl->readerwriters));
> > > +
> > > +     misc_ctrl->mem_size = 0;
> > > +     misc_ctrl->mem_base = 0;
> >
> > This is a performance rather than a correctness nit, so I'm happy for it to be
> > cleaned up in a follow-up patch, but if you're going to memset/assign a bunch
> > of members to zero why not just use devm_kmalloc() instead? Or keep
> > devm_kzalloc() and not do the memset()/assignments of 0 to the members?
>
> I didn't use those because I didn't know about them and didn't dig too
> far into allocation variations.  I'll fix this up later this week (I'm
> OOO).

Reading with a clear head, I see what you're saying.  Yeah, I don't
know, but easy fix.  Thanks for catching that.

>
> >
> > > +
> > > +     /* optional. */
> > > +     node = of_parse_phandle(dev->of_node, "memory-region", 0);
> > > +     if (node) {
> > > +             rc = of_address_to_resource(node, 0, &resm);
> > > +             of_node_put(node);
> > > +             if (rc) {
> > > +                     dev_err(dev, "Couldn't address to resource for reserved memory\n");
> > > +                     return -ENODEV;
> > > +             }
> > > +
> > > +             misc_ctrl->mem_size = resource_size(&resm);
> > > +             misc_ctrl->mem_base = resm.start;
> > > +     }
> > > +
> > > +     misc_ctrl->regmap = syscon_node_to_regmap(pdev->dev.parent->of_node);
> >
> > You're fetching the syscon from the parent node, but your bindings document
> > requires the use of a syscon property. The bindings document is out of sync with
> > the implementation.
> >
> > I believe Rob suggested making the node a child of the syscon (which is what
> > you've implemented here), so it's the bindings document that should be fixed.
> >
> > > +     if (IS_ERR(misc_ctrl->regmap)) {
> > > +             dev_err(dev, "Couldn't get regmap\n");
> > > +             return -ENODEV;
> > > +     }
> > > +
> > > +     misc_ctrl->config = of_device_get_match_data(dev);
> > > +
> > > +     dev_set_drvdata(&pdev->dev, misc_ctrl);
> > > +
> > > +     aspeed_p2a_disable_all(misc_ctrl);
> > > +
> > > +     misc_ctrl->miscdev.minor = MISC_DYNAMIC_MINOR;
> > > +     misc_ctrl->miscdev.name = DEVICE_NAME;
> > > +     misc_ctrl->miscdev.fops = &aspeed_p2a_ctrl_fops;
> > > +     misc_ctrl->miscdev.parent = dev;
> > > +
> > > +     rc = misc_register(&misc_ctrl->miscdev);
> > > +     if (rc)
> > > +             dev_err(dev, "Unable to register device\n");
> > > +
> > > +     return rc;
> > > +}
> > > +
> > > +static int aspeed_p2a_ctrl_remove(struct platform_device *pdev)
> > > +{
> > > +     struct aspeed_p2a_ctrl *p2a_ctrl = dev_get_drvdata(&pdev->dev);
> > > +
> > > +     misc_deregister(&p2a_ctrl->miscdev);
> > > +
> > > +     return 0;
> > > +}
> > > +
> > > +#define SCU2C_DRAM   BIT(25)
> > > +#define SCU2C_SPI    BIT(24)
> > > +#define SCU2C_SOC    BIT(23)
> > > +#define SCU2C_FLASH  BIT(22)
> > > +
> > > +static const struct aspeed_p2a_model_data ast2400_model_data = {
> > > +     .regions = {
> > > +             {0x00000000, 0x17FFFFFF, SCU2C_FLASH},
> > > +             {0x18000000, 0x1FFFFFFF, SCU2C_SOC},
> > > +             {0x20000000, 0x2FFFFFFF, SCU2C_FLASH},
> > > +             {0x30000000, 0x3FFFFFFF, SCU2C_SPI},
> > > +             {0x40000000, 0x5FFFFFFF, SCU2C_DRAM},
> > > +             {0x60000000, 0xFFFFFFFF, SCU2C_SOC},
> > > +     }
> > > +};
> > > +
> > > +static const struct aspeed_p2a_model_data ast2500_model_data = {
> > > +     .regions = {
> > > +             {0x00000000, 0x0FFFFFFF, SCU2C_FLASH},
> > > +             {0x10000000, 0x1FFFFFFF, SCU2C_SOC},
> > > +             {0x20000000, 0x3FFFFFFF, SCU2C_FLASH},
> > > +             {0x40000000, 0x5FFFFFFF, SCU2C_SOC},
> > > +             {0x60000000, 0x7FFFFFFF, SCU2C_SPI},
> > > +             {0x80000000, 0xFFFFFFFF, SCU2C_DRAM},
> > > +     }
> > > +};
> > > +
> > > +static const struct of_device_id aspeed_p2a_ctrl_match[] = {
> > > +     { .compatible = "aspeed,ast2400-p2a-ctrl",
> > > +       .data = &ast2400_model_data },
> > > +     { .compatible = "aspeed,ast2500-p2a-ctrl",
> > > +       .data = &ast2500_model_data },
> > > +     { },
> > > +};
> > > +
> > > +static struct platform_driver aspeed_p2a_ctrl_driver = {
> > > +     .driver = {
> > > +             .name           = DEVICE_NAME,
> > > +             .of_match_table = aspeed_p2a_ctrl_match,
> > > +     },
> > > +     .probe = aspeed_p2a_ctrl_probe,
> > > +     .remove = aspeed_p2a_ctrl_remove,
> > > +};
> > > +
> > > +module_platform_driver(aspeed_p2a_ctrl_driver);
> > > +
> > > +MODULE_DEVICE_TABLE(of, aspeed_p2a_ctrl_match);
> > > +MODULE_LICENSE("GPL");
> > > +MODULE_AUTHOR("Patrick Venture <venture@google.com>");
> > > +MODULE_DESCRIPTION("Control for aspeed 2400/2500 P2A VGA HOST to BMC
> > > mappings");
> >
> > Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> >
> > > diff --git a/include/uapi/linux/aspeed-p2a-ctrl.h
> > > b/include/uapi/linux/aspeed-p2a-ctrl.h
> > > new file mode 100644
> > > index 0000000000000..033355552a6e3
> > > --- /dev/null
> > > +++ b/include/uapi/linux/aspeed-p2a-ctrl.h
> > > @@ -0,0 +1,62 @@
> > > +/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
> > > +/*
> > > + * Copyright 2019 Google Inc
> > > + *
> > > + * This program is free software; you can redistribute it and/or
> > > + * modify it under the terms of the GNU General Public License
> > > + * as published by the Free Software Foundation; either version
> > > + * 2 of the License, or (at your option) any later version.
> > > + *
> > > + * Provides a simple driver to control the ASPEED P2A interface which
> > > allows
> > > + * the host to read and write to various regions of the BMC's memory.
> > > + */
> > > +
> > > +#ifndef _UAPI_LINUX_ASPEED_P2A_CTRL_H
> > > +#define _UAPI_LINUX_ASPEED_P2A_CTRL_H
> > > +
> > > +#include <linux/ioctl.h>
> > > +#include <linux/types.h>
> > > +
> > > +#define ASPEED_P2A_CTRL_READ_ONLY 0
> > > +#define ASPEED_P2A_CTRL_READWRITE 1
> > > +
> > > +/*
> > > + * This driver provides a mechanism for enabling or disabling the
> > > read-write
> > > + * property of specific windows into the ASPEED BMC's memory.
> > > + *
> > > + * A user can map a region of the BMC's memory as read-only or
> > > read-write, with
> > > + * the caveat that once any region is mapped, all regions are unlocked
> > > for
> > > + * reading.
> > > + */
> > > +
> > > +/*
> > > + * Unlock a region of BMC physical memory for access from the host.
> > > + *
> > > + * Also used to read back the optional memory-region configuration for
> > > the
> > > + * driver.
> > > + */
> > > +struct aspeed_p2a_ctrl_mapping {
> > > +     __u64 addr;
> > > +     __u32 length;
> > > +     __u32 flags;
> > > +};
> > > +
> > > +#define __ASPEED_P2A_CTRL_IOCTL_MAGIC 0xb3
> > > +
> > > +/*
> > > + * This IOCTL is meant to configure a region or regions of memory
> > > given a
> > > + * starting address and length to be readable by the host, or
> > > + * readable-writeable.
> > > + */
> > > +#define ASPEED_P2A_CTRL_IOCTL_SET_WINDOW
> > > _IOW(__ASPEED_P2A_CTRL_IOCTL_MAGIC, \
> > > +             0x00, struct aspeed_p2a_ctrl_mapping)
> > > +
> > > +/*
> > > + * This IOCTL is meant to read back to the user the base address and
> > > length of
> > > + * the memory-region specified to the driver for use with mmap.
> > > + */
> > > +#define ASPEED_P2A_CTRL_IOCTL_GET_MEMORY_CONFIG \
> > > +     _IOWR(__ASPEED_P2A_CTRL_IOCTL_MAGIC, \
> > > +             0x01, struct aspeed_p2a_ctrl_mapping)
> > > +
> > > +#endif /* _UAPI_LINUX_ASPEED_P2A_CTRL_H */
> > > --
> > > 2.21.0.392.gf8f6787159e-goog
> > >
> > >

^ permalink raw reply

* [PATCH v9 1/2] dt-bindings: misc: aspeed-p2a-ctrl: add support
From: Patrick Venture @ 2019-04-04 15:25 UTC (permalink / raw)
  To: linux-aspeed

Document the ast2400, ast2500 PCI-to-AHB bridge control driver bindings.

Signed-off-by: Patrick Venture <venture@google.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changes for v9:
 - Added missing details about syscon parent
Changes for v8:
- None
Changes for v7:
- Moved node under the syscon node it requires
Changes for v6:
- None
Changes for v5:
- None
Changes for v4:
- None
Changes for v3:
- None
Changes for v2:
- Added comment about syscon required parameter.
---
 .../bindings/misc/aspeed-p2a-ctrl.txt         | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt

diff --git a/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt b/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
new file mode 100644
index 0000000000000..05ed654848b60
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
@@ -0,0 +1,56 @@
+======================================================================
+Device tree bindings for Aspeed AST2400/AST2500 PCI-to-AHB Bridge Control Driver
+======================================================================
+
+The bridge is available on platforms with the VGA enabled on the Aspeed device.
+In this case, the host has access to a 64KiB window into all of the BMC's
+memory.  The BMC can disable this bridge.  If the bridge is enabled, the host
+has read access to all the regions of memory, however the host only has read
+and write access depending on a register controlled by the BMC.
+
+Required properties:
+===================
+
+ - compatible: must be one of:
+	- "aspeed,ast2400-p2a-ctrl"
+	- "aspeed,ast2500-p2a-ctrl"
+
+Optional properties:
+===================
+
+- memory-region: A phandle to a reserved_memory region to be used for the PCI
+		to AHB mapping
+
+The p2a-control node should be the child of a syscon node with the required
+property:
+
+- compatible : Should be one of the following:
+		"aspeed,ast2400-scu", "syscon", "simple-mfd"
+		"aspeed,g4-scu", "syscon", "simple-mfd"
+		"aspeed,ast2500-scu", "syscon", "simple-mfd"
+		"aspeed,g5-scu", "syscon", "simple-mfd"
+
+The aspeed-p2a-ctrl node should be the child of a syscon node with the required
+property:
+
+- compatible : Should be one of the following:
+		"aspeed,ast2400-scu", "syscon", "simple-mfd"
+		"aspeed,g4-scu", "syscon", "simple-mfd"
+		"aspeed,ast2500-scu", "syscon", "simple-mfd"
+		"aspeed,g5-scu", "syscon", "simple-mfd"
+
+Example
+===================
+
+g4 Example
+----------
+
+syscon: scu at 1e6e2000 {
+	compatible = "aspeed,ast2400-scu", "syscon", "simple-mfd";
+	reg = <0x1e6e2000 0x1a8>;
+
+	p2a: p2a-control {
+		compatible = "aspeed,ast2400-p2a-ctrl";
+		memory-region = <&reserved_memory>;
+	};
+};
-- 
2.21.0.392.gf8f6787159e-goog


^ permalink raw reply related

* [PATCH v9 2/2] drivers/misc: Add Aspeed P2A control driver
From: Patrick Venture @ 2019-04-04 15:25 UTC (permalink / raw)
  To: linux-aspeed

The ASPEED AST2400, and AST2500 in some configurations include a
PCI-to-AHB MMIO bridge.  This bridge allows a server to read and write
in the BMC's physical address space.  This feature is especially useful
when using this bridge to send large files to the BMC.

The host may use this to send down a firmware image by staging data at a
specific memory address, and in a coordinated effort with the BMC's
software stack and kernel, transmit the bytes.

This driver enables the BMC to unlock the PCI bridge on demand, and
configure it via ioctl to allow the host to write bytes to an agreed
upon location.  In the primary use-case, the region to use is known
apriori on the BMC, and the host requests this information.  Once this
request is received, the BMC's software stack will enable the bridge and
the region and then using some software flow control (possibly via IPMI
packets), copy the bytes down.  Once the process is complete, the BMC
will disable the bridge and unset any region involved.

The default behavior of this bridge when present is: enabled and all
regions marked read-write.  This driver will fix the regions to be
read-only and then disable the bridge entirely.

The memory regions protected are:
 * BMC flash MMIO window
 * System flash MMIO windows
 * SOC IO (peripheral MMIO)
 * DRAM

The DRAM region itself is all of DRAM and cannot be further specified.
Once the PCI bridge is enabled, the host can read all of DRAM, and if
the DRAM section is write-enabled, then it can write to all of it.

Signed-off-by: Patrick Venture <venture@google.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
---
Changes for v9:
 - Stop zeroing out memory that is already zeroed out.
Changes for v8:
 - Promoted u32 address values to u64 to be compatible with either.
Changes for v7:
- Moved node under the syscon node and changed therefore how it grabs the phandle for the regmap.
Changes for v6:
- Cleaned up documentation
- Added missing machine-readable copyright lines.
- Fixed over 80 chars instances.
- Changed error from invalid memory-region node to ENODEV.
Changes for v5:
- Fixup missing exit condition and remove extra jump.
Changes for v4:
- Added ioctl for reading back the memory-region configuration.
- Cleaned up some unused variables.
Changes for v3:
- Deleted unused read and write methods.
Changes for v2:
- Dropped unused reads.
- Moved call to disable bridge to before registering device.
- Switch from using regs to using a syscon regmap. <<< IN PROGRESS
- Updated the commit message. <<< TODO
- Updated the bit flipped for SCU180_ENP2A
- Dropped boolean region_specified variable.
- Renamed p2a_ctrl in _probe to misc_ctrl per suggestion.
- Renamed aspeed_p2a_region_search to aspeed_p2a_region_acquire
- Updated commit message.
---
 drivers/misc/Kconfig                 |   8 +
 drivers/misc/Makefile                |   1 +
 drivers/misc/aspeed-p2a-ctrl.c       | 443 +++++++++++++++++++++++++++
 include/uapi/linux/aspeed-p2a-ctrl.h |  62 ++++
 4 files changed, 514 insertions(+)
 create mode 100644 drivers/misc/aspeed-p2a-ctrl.c
 create mode 100644 include/uapi/linux/aspeed-p2a-ctrl.h

diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 42ab8ec92a046..3209ee020b153 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -496,6 +496,14 @@ config VEXPRESS_SYSCFG
 	  bus. System Configuration interface is one of the possible means
 	  of generating transactions on this bus.
 
+config ASPEED_P2A_CTRL
+	depends on (ARCH_ASPEED || COMPILE_TEST) && REGMAP && MFD_SYSCON
+	tristate "Aspeed ast2400/2500 HOST P2A VGA MMIO to BMC bridge control"
+	help
+	  Control Aspeed ast2400/2500 HOST P2A VGA MMIO to BMC mappings through
+	  ioctl()s, the driver also provides an interface for userspace mappings to
+	  a pre-defined region.
+
 config ASPEED_LPC_CTRL
 	depends on (ARCH_ASPEED || COMPILE_TEST) && REGMAP && MFD_SYSCON
 	tristate "Aspeed ast2400/2500 HOST LPC to BMC bridge control"
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index d5b7d3404dc78..c36239573a5ca 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -56,6 +56,7 @@ obj-$(CONFIG_VEXPRESS_SYSCFG)	+= vexpress-syscfg.o
 obj-$(CONFIG_CXL_BASE)		+= cxl/
 obj-$(CONFIG_ASPEED_LPC_CTRL)	+= aspeed-lpc-ctrl.o
 obj-$(CONFIG_ASPEED_LPC_SNOOP)	+= aspeed-lpc-snoop.o
+obj-$(CONFIG_ASPEED_P2A_CTRL)	+= aspeed-p2a-ctrl.o
 obj-$(CONFIG_PCI_ENDPOINT_TEST)	+= pci_endpoint_test.o
 obj-$(CONFIG_OCXL)		+= ocxl/
 obj-y				+= cardreader/
diff --git a/drivers/misc/aspeed-p2a-ctrl.c b/drivers/misc/aspeed-p2a-ctrl.c
new file mode 100644
index 0000000000000..c0521b2ffc6ac
--- /dev/null
+++ b/drivers/misc/aspeed-p2a-ctrl.c
@@ -0,0 +1,443 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2019 Google Inc
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * Provides a simple driver to control the ASPEED P2A interface which allows
+ * the host to read and write to various regions of the BMC's memory.
+ */
+
+#include <linux/fs.h>
+#include <linux/io.h>
+#include <linux/mfd/syscon.h>
+#include <linux/miscdevice.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/mutex.h>
+#include <linux/of_address.h>
+#include <linux/of_device.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/slab.h>
+#include <linux/uaccess.h>
+
+#include <linux/aspeed-p2a-ctrl.h>
+
+#define DEVICE_NAME	"aspeed-p2a-ctrl"
+
+/* SCU2C is a Misc. Control Register. */
+#define SCU2C 0x2c
+/* SCU180 is the PCIe Configuration Setting Control Register. */
+#define SCU180 0x180
+/* Bit 1 controls the P2A bridge, while bit 0 controls the entire VGA device
+ * on the PCI bus.
+ */
+#define SCU180_ENP2A BIT(1)
+
+/* The ast2400/2500 both have six ranges. */
+#define P2A_REGION_COUNT 6
+
+struct region {
+	u64 min;
+	u64 max;
+	u32 bit;
+};
+
+struct aspeed_p2a_model_data {
+	/* min, max, bit */
+	struct region regions[P2A_REGION_COUNT];
+};
+
+struct aspeed_p2a_ctrl {
+	struct miscdevice miscdev;
+	struct regmap *regmap;
+
+	const struct aspeed_p2a_model_data *config;
+
+	/* Access to these needs to be locked, held via probe, mapping ioctl,
+	 * and release, remove.
+	 */
+	struct mutex tracking;
+	u32 readers;
+	u32 readerwriters[P2A_REGION_COUNT];
+
+	phys_addr_t mem_base;
+	resource_size_t mem_size;
+};
+
+struct aspeed_p2a_user {
+	struct file *file;
+	struct aspeed_p2a_ctrl *parent;
+
+	/* The entire memory space is opened for reading once the bridge is
+	 * enabled, therefore this needs only to be tracked once per user.
+	 * If any user has it open for read, the bridge must stay enabled.
+	 */
+	u32 read;
+
+	/* Each entry of the array corresponds to a P2A Region.  If the user
+	 * opens for read or readwrite, the reference goes up here.  On
+	 * release, this array is walked and references adjusted accordingly.
+	 */
+	u32 readwrite[P2A_REGION_COUNT];
+};
+
+static void aspeed_p2a_enable_bridge(struct aspeed_p2a_ctrl *p2a_ctrl)
+{
+	regmap_update_bits(p2a_ctrl->regmap,
+		SCU180, SCU180_ENP2A, SCU180_ENP2A);
+}
+
+static void aspeed_p2a_disable_bridge(struct aspeed_p2a_ctrl *p2a_ctrl)
+{
+	regmap_update_bits(p2a_ctrl->regmap, SCU180, SCU180_ENP2A, 0);
+}
+
+static int aspeed_p2a_mmap(struct file *file, struct vm_area_struct *vma)
+{
+	struct aspeed_p2a_user *priv = file->private_data;
+	struct aspeed_p2a_ctrl *ctrl = priv->parent;
+
+	if (ctrl->mem_base == 0 && ctrl->mem_size == 0)
+		return -EINVAL;
+
+	unsigned long vsize = vma->vm_end - vma->vm_start;
+	pgprot_t prot = vma->vm_page_prot;
+
+	if (vma->vm_pgoff + vsize > ctrl->mem_base + ctrl->mem_size)
+		return -EINVAL;
+
+	/* ast2400/2500 AHB accesses are not cache coherent */
+	prot = pgprot_noncached(prot);
+
+	if (remap_pfn_range(vma, vma->vm_start,
+		(ctrl->mem_base >> PAGE_SHIFT) + vma->vm_pgoff,
+		vsize, prot))
+		return -EAGAIN;
+
+	return 0;
+}
+
+static bool aspeed_p2a_region_acquire(struct aspeed_p2a_user *priv,
+		struct aspeed_p2a_ctrl *ctrl,
+		struct aspeed_p2a_ctrl_mapping *map)
+{
+	int i;
+	u64 base, end;
+	bool matched = false;
+
+	base = map->addr;
+	end = map->addr + (map->length - 1);
+
+	/* If the value is a legal u32, it will find a match. */
+	for (i = 0; i < P2A_REGION_COUNT; i++) {
+		const struct region *curr = &ctrl->config->regions[i];
+
+		/* If the top of this region is lower than your base, skip it.
+		 */
+		if (curr->max < base)
+			continue;
+
+		/* If the bottom of this region is higher than your end, bail.
+		 */
+		if (curr->min > end)
+			break;
+
+		/* Lock this and update it, therefore it someone else is
+		 * closing their file out, this'll preserve the increment.
+		 */
+		mutex_lock(&ctrl->tracking);
+		ctrl->readerwriters[i] += 1;
+		mutex_unlock(&ctrl->tracking);
+
+		/* Track with the user, so when they close their file, we can
+		 * decrement properly.
+		 */
+		priv->readwrite[i] += 1;
+
+		/* Enable the region as read-write. */
+		regmap_update_bits(ctrl->regmap, SCU2C, curr->bit, 0);
+		matched = true;
+	}
+
+	return matched;
+}
+
+static long aspeed_p2a_ioctl(struct file *file, unsigned int cmd,
+		unsigned long data)
+{
+	struct aspeed_p2a_user *priv = file->private_data;
+	struct aspeed_p2a_ctrl *ctrl = priv->parent;
+	void __user *arg = (void __user *)data;
+	struct aspeed_p2a_ctrl_mapping map;
+
+	if (copy_from_user(&map, arg, sizeof(map)))
+		return -EFAULT;
+
+	switch (cmd) {
+	case ASPEED_P2A_CTRL_IOCTL_SET_WINDOW:
+		/* If they want a region to be read-only, since the entire
+		 * region is read-only once enabled, we just need to track this
+		 * user wants to read from the bridge, and if it's not enabled.
+		 * Enable it.
+		 */
+		if (map.flags == ASPEED_P2A_CTRL_READ_ONLY) {
+			mutex_lock(&ctrl->tracking);
+			ctrl->readers += 1;
+			mutex_unlock(&ctrl->tracking);
+
+			/* Track with the user, so when they close their file,
+			 * we can decrement properly.
+			 */
+			priv->read += 1;
+		} else if (map.flags == ASPEED_P2A_CTRL_READWRITE) {
+			/* If we don't acquire any region return error. */
+			if (!aspeed_p2a_region_acquire(priv, ctrl, &map)) {
+				return -EINVAL;
+			}
+		} else {
+			/* Invalid map flags. */
+			return -EINVAL;
+		}
+
+		aspeed_p2a_enable_bridge(ctrl);
+		return 0;
+	case ASPEED_P2A_CTRL_IOCTL_GET_MEMORY_CONFIG:
+		/* This is a request for the memory-region and corresponding
+		 * length that is used by the driver for mmap.
+		 */
+
+		map.flags = 0;
+		map.addr = ctrl->mem_base;
+		map.length = ctrl->mem_size;
+
+		return copy_to_user(arg, &map, sizeof(map)) ? -EFAULT : 0;
+	}
+
+	return -EINVAL;
+}
+
+
+/*
+ * When a user opens this file, we create a structure to track their mappings.
+ *
+ * A user can map a region as read-only (bridge enabled), or read-write (bit
+ * flipped, and bridge enabled).  Either way, this tracking is used, s.t. when
+ * they release the device references are handled.
+ *
+ * The bridge is not enabled until a user calls an ioctl to map a region,
+ * simply opening the device does not enable it.
+ */
+static int aspeed_p2a_open(struct inode *inode, struct file *file)
+{
+	struct aspeed_p2a_user *priv;
+
+	priv = kmalloc(sizeof(*priv), GFP_KERNEL);
+	if (!priv)
+		return -ENOMEM;
+
+	priv->file = file;
+	priv->read = 0;
+	memset(priv->readwrite, 0, sizeof(priv->readwrite));
+
+	/* The file's private_data is initialized to the p2a_ctrl. */
+	priv->parent = file->private_data;
+
+	/* Set the file's private_data to the user's data. */
+	file->private_data = priv;
+
+	return 0;
+}
+
+/*
+ * This will close the users mappings.  It will go through what they had opened
+ * for readwrite, and decrement those counts.  If at the end, this is the last
+ * user, it'll close the bridge.
+ */
+static int aspeed_p2a_release(struct inode *inode, struct file *file)
+{
+	int i;
+	u32 value;
+	u32 bits = 0;
+	bool open_regions = false;
+	struct aspeed_p2a_user *priv = file->private_data;
+
+	/* Lock others from changing these values until everything is updated
+	 * in one pass.
+	 */
+	mutex_lock(&priv->parent->tracking);
+
+	priv->parent->readers -= priv->read;
+
+	for (i = 0; i < P2A_REGION_COUNT; i++) {
+		priv->parent->readerwriters[i] -= priv->readwrite[i];
+
+		if (priv->parent->readerwriters[i] > 0)
+			open_regions = true;
+		else
+			bits |= priv->parent->config->regions[i].bit;
+	}
+
+	/* Setting a bit to 1 disables the region, so let's just OR with the
+	 * above to disable any.
+	 */
+
+	/* Note, if another user is trying to ioctl, they can't grab tracking,
+	 * and therefore can't grab either register mutex.
+	 * If another user is trying to close, they can't grab tracking either.
+	 */
+	regmap_update_bits(priv->parent->regmap, SCU2C, bits, bits);
+
+	/* If parent->readers is zero and open windows is 0, disable the
+	 * bridge.
+	 */
+	if (!open_regions && priv->parent->readers == 0)
+		aspeed_p2a_disable_bridge(priv->parent);
+
+	mutex_unlock(&priv->parent->tracking);
+
+	kfree(priv);
+
+	return 0;
+}
+
+static const struct file_operations aspeed_p2a_ctrl_fops = {
+	.owner = THIS_MODULE,
+	.mmap = aspeed_p2a_mmap,
+	.unlocked_ioctl = aspeed_p2a_ioctl,
+	.open = aspeed_p2a_open,
+	.release = aspeed_p2a_release,
+};
+
+/* The regions are controlled by SCU2C */
+static void aspeed_p2a_disable_all(struct aspeed_p2a_ctrl *p2a_ctrl)
+{
+	int i;
+	u32 value = 0;
+
+	for (i = 0; i < P2A_REGION_COUNT; i++)
+		value |= p2a_ctrl->config->regions[i].bit;
+
+	regmap_update_bits(p2a_ctrl->regmap, SCU2C, value, value);
+
+	/* Disable the bridge. */
+	aspeed_p2a_disable_bridge(p2a_ctrl);
+}
+
+static int aspeed_p2a_ctrl_probe(struct platform_device *pdev)
+{
+	struct aspeed_p2a_ctrl *misc_ctrl;
+	struct device *dev;
+	struct resource *res, resm;
+	struct device_node *node;
+	int rc = 0;
+
+	dev = &pdev->dev;
+
+	misc_ctrl = devm_kzalloc(dev, sizeof(*misc_ctrl), GFP_KERNEL);
+	if (!misc_ctrl)
+		return -ENOMEM;
+
+	mutex_init(&misc_ctrl->tracking);
+
+	/* optional. */
+	node = of_parse_phandle(dev->of_node, "memory-region", 0);
+	if (node) {
+		rc = of_address_to_resource(node, 0, &resm);
+		of_node_put(node);
+		if (rc) {
+			dev_err(dev, "Couldn't address to resource for reserved memory\n");
+			return -ENODEV;
+		}
+
+		misc_ctrl->mem_size = resource_size(&resm);
+		misc_ctrl->mem_base = resm.start;
+	}
+
+	misc_ctrl->regmap = syscon_node_to_regmap(pdev->dev.parent->of_node);
+	if (IS_ERR(misc_ctrl->regmap)) {
+		dev_err(dev, "Couldn't get regmap\n");
+		return -ENODEV;
+	}
+
+	misc_ctrl->config = of_device_get_match_data(dev);
+
+	dev_set_drvdata(&pdev->dev, misc_ctrl);
+
+	aspeed_p2a_disable_all(misc_ctrl);
+
+	misc_ctrl->miscdev.minor = MISC_DYNAMIC_MINOR;
+	misc_ctrl->miscdev.name = DEVICE_NAME;
+	misc_ctrl->miscdev.fops = &aspeed_p2a_ctrl_fops;
+	misc_ctrl->miscdev.parent = dev;
+
+	rc = misc_register(&misc_ctrl->miscdev);
+	if (rc)
+		dev_err(dev, "Unable to register device\n");
+
+	return rc;
+}
+
+static int aspeed_p2a_ctrl_remove(struct platform_device *pdev)
+{
+	struct aspeed_p2a_ctrl *p2a_ctrl = dev_get_drvdata(&pdev->dev);
+
+	misc_deregister(&p2a_ctrl->miscdev);
+
+	return 0;
+}
+
+#define SCU2C_DRAM	BIT(25)
+#define SCU2C_SPI	BIT(24)
+#define SCU2C_SOC	BIT(23)
+#define SCU2C_FLASH	BIT(22)
+
+static const struct aspeed_p2a_model_data ast2400_model_data = {
+	.regions = {
+		{0x00000000, 0x17FFFFFF, SCU2C_FLASH},
+		{0x18000000, 0x1FFFFFFF, SCU2C_SOC},
+		{0x20000000, 0x2FFFFFFF, SCU2C_FLASH},
+		{0x30000000, 0x3FFFFFFF, SCU2C_SPI},
+		{0x40000000, 0x5FFFFFFF, SCU2C_DRAM},
+		{0x60000000, 0xFFFFFFFF, SCU2C_SOC},
+	}
+};
+
+static const struct aspeed_p2a_model_data ast2500_model_data = {
+	.regions = {
+		{0x00000000, 0x0FFFFFFF, SCU2C_FLASH},
+		{0x10000000, 0x1FFFFFFF, SCU2C_SOC},
+		{0x20000000, 0x3FFFFFFF, SCU2C_FLASH},
+		{0x40000000, 0x5FFFFFFF, SCU2C_SOC},
+		{0x60000000, 0x7FFFFFFF, SCU2C_SPI},
+		{0x80000000, 0xFFFFFFFF, SCU2C_DRAM},
+	}
+};
+
+static const struct of_device_id aspeed_p2a_ctrl_match[] = {
+	{ .compatible = "aspeed,ast2400-p2a-ctrl",
+	  .data = &ast2400_model_data },
+	{ .compatible = "aspeed,ast2500-p2a-ctrl",
+	  .data = &ast2500_model_data },
+	{ },
+};
+
+static struct platform_driver aspeed_p2a_ctrl_driver = {
+	.driver = {
+		.name		= DEVICE_NAME,
+		.of_match_table = aspeed_p2a_ctrl_match,
+	},
+	.probe = aspeed_p2a_ctrl_probe,
+	.remove = aspeed_p2a_ctrl_remove,
+};
+
+module_platform_driver(aspeed_p2a_ctrl_driver);
+
+MODULE_DEVICE_TABLE(of, aspeed_p2a_ctrl_match);
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Patrick Venture <venture@google.com>");
+MODULE_DESCRIPTION("Control for aspeed 2400/2500 P2A VGA HOST to BMC mappings");
diff --git a/include/uapi/linux/aspeed-p2a-ctrl.h b/include/uapi/linux/aspeed-p2a-ctrl.h
new file mode 100644
index 0000000000000..033355552a6e3
--- /dev/null
+++ b/include/uapi/linux/aspeed-p2a-ctrl.h
@@ -0,0 +1,62 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
+/*
+ * Copyright 2019 Google Inc
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * Provides a simple driver to control the ASPEED P2A interface which allows
+ * the host to read and write to various regions of the BMC's memory.
+ */
+
+#ifndef _UAPI_LINUX_ASPEED_P2A_CTRL_H
+#define _UAPI_LINUX_ASPEED_P2A_CTRL_H
+
+#include <linux/ioctl.h>
+#include <linux/types.h>
+
+#define ASPEED_P2A_CTRL_READ_ONLY 0
+#define ASPEED_P2A_CTRL_READWRITE 1
+
+/*
+ * This driver provides a mechanism for enabling or disabling the read-write
+ * property of specific windows into the ASPEED BMC's memory.
+ *
+ * A user can map a region of the BMC's memory as read-only or read-write, with
+ * the caveat that once any region is mapped, all regions are unlocked for
+ * reading.
+ */
+
+/*
+ * Unlock a region of BMC physical memory for access from the host.
+ *
+ * Also used to read back the optional memory-region configuration for the
+ * driver.
+ */
+struct aspeed_p2a_ctrl_mapping {
+	__u64 addr;
+	__u32 length;
+	__u32 flags;
+};
+
+#define __ASPEED_P2A_CTRL_IOCTL_MAGIC 0xb3
+
+/*
+ * This IOCTL is meant to configure a region or regions of memory given a
+ * starting address and length to be readable by the host, or
+ * readable-writeable.
+ */
+#define ASPEED_P2A_CTRL_IOCTL_SET_WINDOW _IOW(__ASPEED_P2A_CTRL_IOCTL_MAGIC, \
+		0x00, struct aspeed_p2a_ctrl_mapping)
+
+/*
+ * This IOCTL is meant to read back to the user the base address and length of
+ * the memory-region specified to the driver for use with mmap.
+ */
+#define ASPEED_P2A_CTRL_IOCTL_GET_MEMORY_CONFIG \
+	_IOWR(__ASPEED_P2A_CTRL_IOCTL_MAGIC, \
+		0x01, struct aspeed_p2a_ctrl_mapping)
+
+#endif /* _UAPI_LINUX_ASPEED_P2A_CTRL_H */
-- 
2.21.0.392.gf8f6787159e-goog


^ permalink raw reply related

* [PATCH v2] ARM: dts: aspeed: Add Power9 and Power9 CFAM description
From: Joel Stanley @ 2019-04-05  3:14 UTC (permalink / raw)
  To: linux-aspeed

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

To be used by the OpenPower BMC machines.

This provides proper chip IDs but also adds the various sub-devices
necessary for the future OCC driver among other. All the added nodes
comply with the existing upstream FSI bindings.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
v2: The first version of this used a bit more magic and was nak'd by
Olof. I've reworked it to not use macros. It still needs to be included
in the parent device tree after the fsi node is created.

 arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts  |   2 +
 arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts |  22 ++
 arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts  |   8 +
 .../boot/dts/aspeed-bmc-opp-witherspoon.dts   |   2 +
 arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts    |   2 +
 arch/arm/boot/dts/ibm-power9-dual.dtsi        | 248 ++++++++++++++++++
 6 files changed, 284 insertions(+)
 create mode 100644 arch/arm/boot/dts/ibm-power9-dual.dtsi

diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts b/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
index 024e52a6cd0f..de95112e2a04 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
@@ -322,3 +322,5 @@
 &adc {
 	status = "okay";
 };
+
+#include "ibm-power9-dual.dtsi"
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
index b249da80fb83..b0cb34ccb135 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
@@ -347,3 +347,25 @@
 		line-name = "BMC_TPM_INT_N";
 	};
 };
+
+&fsi {
+	cfam at 0,0 {
+		reg = <0 0>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		chip-id = <0>;
+
+		scom at 1000 {
+			compatible = "ibm,fsi2pib";
+			reg = <0x1000 0x400>;
+		};
+
+		fsi_hub0: hub at 3400 {
+			compatible = "ibm,fsi-master-hub";
+			reg = <0x3400 0x400>;
+			#address-cells = <2>;
+			#size-cells = <0>;
+			no-scan-on-init;
+		};
+	};
+};
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
index 76fe994f2ba4..5a6bbb3b6640 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
@@ -296,3 +296,11 @@
 &adc {
 	status = "okay";
 };
+
+&gfx {
+     status = "okay";
+     memory-region = <&gfx_memory>;
+};
+
+#include "ibm-power9-dual.dtsi"
+
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
index ad54117c075e..a0a4a0c6bc2a 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
@@ -592,3 +592,5 @@
 &adc {
 	status = "okay";
 };
+
+#include "ibm-power9-dual.dtsi"
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
index 2c5aa90a546d..05df11cacb21 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
@@ -435,3 +435,5 @@
 &ibt {
 	status = "okay";
 };
+
+#include "ibm-power9-dual.dtsi"
diff --git a/arch/arm/boot/dts/ibm-power9-dual.dtsi b/arch/arm/boot/dts/ibm-power9-dual.dtsi
new file mode 100644
index 000000000000..2abc42eda7b0
--- /dev/null
+++ b/arch/arm/boot/dts/ibm-power9-dual.dtsi
@@ -0,0 +1,248 @@
+// SPDX-License-Identifier: GPL-2.0+
+// Copyright 2018 IBM Corp
+
+&fsi {
+	cfam at 0,0 {
+		reg = <0 0>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		chip-id = <0>;
+
+		scom at 1000 {
+			compatible = "ibm,fsi2pib";
+			reg = <0x1000 0x400>;
+		};
+
+		i2c at 1800 {
+			compatible = "ibm,fsi-i2c-master";
+			reg = <0x1800 0x400>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			cfam0_i2c0: i2c-bus at 0 {
+				reg = <0>;
+			};
+
+			cfam0_i2c1: i2c-bus at 1 {
+				reg = <1>;
+			};
+
+			cfam0_i2c2: i2c-bus at 2 {
+				reg = <2>;
+			};
+
+			cfam0_i2c3: i2c-bus at 3 {
+				reg = <3>;
+			};
+
+			cfam0_i2c4: i2c-bus at 4 {
+				reg = <4>;
+			};
+
+			cfam0_i2c5: i2c-bus at 5 {
+				reg = <5>;
+			};
+
+			cfam0_i2c6: i2c-bus at 6 {
+				reg = <6>;
+			};
+
+			cfam0_i2c7: i2c-bus at 7 {
+				reg = <7>;
+			};
+
+			cfam0_i2c8: i2c-bus at 8 {
+				reg = <8>;
+			};
+
+			cfam0_i2c9: i2c-bus at 9 {
+				reg = <9>;
+			};
+
+			cfam0_i2c10: i2c-bus at a {
+				reg = <10>;
+			};
+
+			cfam0_i2c11: i2c-bus at b {
+				reg = <11>;
+			};
+
+			cfam0_i2c12: i2c-bus at c {
+				reg = <12>;
+			};
+
+			cfam0_i2c13: i2c-bus at d {
+				reg = <13>;
+			};
+
+			cfam0_i2c14: i2c-bus at e {
+				reg = <14>;
+			};
+		};
+
+		sbefifo at 2400 {
+			compatible = "ibm,p9-sbefifo";
+			reg = <0x2400 0x400>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			fsi_occ0: occ {
+				compatible = "ibm,p9-occ";
+			};
+		};
+
+		fsi_hub0: hub at 3400 {
+			compatible = "fsi-master-hub";
+			reg = <0x3400 0x400>;
+			#address-cells = <2>;
+			#size-cells = <0>;
+
+			no-scan-on-init;
+		};
+	};
+};
+
+&fsi_hub0 {
+	cfam at 1,0 {
+		reg = <1 0>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		chip-id = <1>;
+
+		scom at 1000 {
+			compatible = "ibm,fsi2pib";
+			reg = <0x1000 0x400>;
+		};
+
+		i2c at 1800 {
+			compatible = "ibm,fsi-i2c-master";
+			reg = <0x1800 0x400>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			cfam1_i2c0: i2c-bus at 0 {
+				reg = <0>;
+			};
+
+			cfam1_i2c1: i2c-bus at 1 {
+				reg = <1>;
+			};
+
+			cfam1_i2c2: i2c-bus at 2 {
+				reg = <2>;
+			};
+
+			cfam1_i2c3: i2c-bus at 3 {
+				reg = <3>;
+			};
+
+			cfam1_i2c4: i2c-bus at 4 {
+				reg = <4>;
+			};
+
+			cfam1_i2c5: i2c-bus at 5 {
+				reg = <5>;
+			};
+
+			cfam1_i2c6: i2c-bus at 6 {
+				reg = <6>;
+			};
+
+			cfam1_i2c7: i2c-bus at 7 {
+				reg = <7>;
+			};
+
+			cfam1_i2c8: i2c-bus at 8 {
+				reg = <8>;
+			};
+
+			cfam1_i2c9: i2c-bus at 9 {
+				reg = <9>;
+			};
+
+			cfam1_i2c10: i2c-bus at a {
+				reg = <10>;
+			};
+
+			cfam1_i2c11: i2c-bus at b {
+				reg = <11>;
+			};
+
+			cfam1_i2c12: i2c-bus at c {
+				reg = <12>;
+			};
+
+			cfam1_i2c13: i2c-bus at d {
+				reg = <13>;
+			};
+
+			cfam1_i2c14: i2c-bus at e {
+				reg = <14>;
+			};
+		};
+
+		sbefifo at 2400 {
+			compatible = "ibm,p9-sbefifo";
+			reg = <0x2400 0x400>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			fsi_occ1: occ {
+				compatible = "ibm,p9-occ";
+			};
+		};
+
+		fsi_hub1: hub at 3400 {
+			compatible = "fsi-master-hub";
+			reg = <0x3400 0x400>;
+			#address-cells = <2>;
+			#size-cells = <0>;
+
+			no-scan-on-init;
+		};
+	};
+};
+
+/* Legacy OCC numbering (to get rid of when userspace is fixed) */
+&fsi_occ0 {
+	reg = <1>;
+};
+
+&fsi_occ1 {
+	reg = <2>;
+};
+
+/ {
+	aliases {
+		i2c100 = &cfam0_i2c0;
+		i2c101 = &cfam0_i2c1;
+		i2c102 = &cfam0_i2c2;
+		i2c103 = &cfam0_i2c3;
+		i2c104 = &cfam0_i2c4;
+		i2c105 = &cfam0_i2c5;
+		i2c106 = &cfam0_i2c6;
+		i2c107 = &cfam0_i2c7;
+		i2c108 = &cfam0_i2c8;
+		i2c109 = &cfam0_i2c9;
+		i2c110 = &cfam0_i2c10;
+		i2c111 = &cfam0_i2c11;
+		i2c112 = &cfam0_i2c12;
+		i2c113 = &cfam0_i2c13;
+		i2c114 = &cfam0_i2c14;
+		i2c200 = &cfam1_i2c0;
+		i2c201 = &cfam1_i2c1;
+		i2c202 = &cfam1_i2c2;
+		i2c203 = &cfam1_i2c3;
+		i2c204 = &cfam1_i2c4;
+		i2c205 = &cfam1_i2c5;
+		i2c206 = &cfam1_i2c6;
+		i2c207 = &cfam1_i2c7;
+		i2c208 = &cfam1_i2c8;
+		i2c209 = &cfam1_i2c9;
+		i2c210 = &cfam1_i2c10;
+		i2c211 = &cfam1_i2c11;
+		i2c212 = &cfam1_i2c12;
+		i2c213 = &cfam1_i2c13;
+		i2c214 = &cfam1_i2c14;
+	};
+};
-- 
2.20.1


^ permalink raw reply related

* [PATCH] ARM: dts: aspeed: Rename flash-controller nodes
From: Joel Stanley @ 2019-04-05  3:32 UTC (permalink / raw)
  To: linux-aspeed

The device tree compiler has started spitting out warnings about these
names, insisting they be called 'spi':

 ../arch/arm/boot/dts/aspeed-g5.dtsi:108.35-128.5: Warning
 (spi_bus_bridge): /ahb/flash-controller at 1e631000: node name for SPI
 buses should be 'spi'

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 arch/arm/boot/dts/aspeed-g4.dtsi | 4 ++--
 arch/arm/boot/dts/aspeed-g5.dtsi | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
index 9549f867aa1e..5156afccc8ed 100644
--- a/arch/arm/boot/dts/aspeed-g4.dtsi
+++ b/arch/arm/boot/dts/aspeed-g4.dtsi
@@ -53,7 +53,7 @@
 		#size-cells = <1>;
 		ranges;
 
-		fmc: flash-controller at 1e620000 {
+		fmc: spi at 1e620000 {
 			reg = < 0x1e620000 0x94
 				0x20000000 0x10000000 >;
 			#address-cells = <1>;
@@ -69,7 +69,7 @@
 			};
 		};
 
-		spi: flash-controller at 1e630000 {
+		spi: spi at 1e630000 {
 			reg = < 0x1e630000 0x18
 				0x30000000 0x10000000 >;
 			#address-cells = <1>;
diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index 85ed9dbec196..551528ccb7b8 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -60,7 +60,7 @@
 		#size-cells = <1>;
 		ranges;
 
-		fmc: flash-controller at 1e620000 {
+		fmc: spi at 1e620000 {
 			reg = < 0x1e620000 0xc4
 				0x20000000 0x10000000 >;
 			#address-cells = <1>;
@@ -86,7 +86,7 @@
 			};
 		};
 
-		spi1: flash-controller at 1e630000 {
+		spi1: spi at 1e630000 {
 			reg = < 0x1e630000 0xc4
 				0x30000000 0x08000000 >;
 			#address-cells = <1>;
@@ -106,7 +106,7 @@
 			};
 		};
 
-		spi2: flash-controller at 1e631000 {
+		spi2: spi at 1e631000 {
 			reg = < 0x1e631000 0xc4
 				0x38000000 0x08000000 >;
 			#address-cells = <1>;
-- 
2.20.1


^ permalink raw reply related

* [GIT PULL] ARM: aspeed: dts changes for 5.2
From: Joel Stanley @ 2019-04-05  3:47 UTC (permalink / raw)
  To: linux-aspeed

Hello ARM Maintainers,

Here's the first ASPEED device tree pull request for 5.2. There might be a
second one later as I pushed out a pair of patches for review today.

The following changes since commit 9e98c678c2d6ae3a17cb2de55d17f69dddaa231b:

  Linux 5.1-rc1 (2019-03-17 14:22:26 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/joel/aspeed.git \
    tags/aspeed-5.2-devicetree

for you to fetch changes up to 6d00c6f8d2e781e3c821fc9c614f404cc981804d:

  ARM: dts: aspeed: Add RTC node (2019-04-05 14:08:20 +1030)

----------------------------------------------------------------
ASPEED device tree updates for 5.2

 - RTC and GFX DRM driver went upstream this cycle

 - Miscellaneous board updates for Facebook and IBM BMCs

----------------------------------------------------------------
Eddie James (2):
      ARM: dts: aspeed: witherspoon: Enable vhub
      ARM: dts: aspeed-g5: Add video engine

Edward A. James (1):
      ARM: dts: aspeed: witherspoon: Update BMC partitioning

Joel Stanley (4):
      ARM: dts: aspeed: ast2500: Update flash layout
      ARM: dts: aspeed-g5: Add resets and clocks to GFX node
      ARM: dts: aspeed: Enable the GFX IP
      ARM: dts: aspeed: Add RTC node

Lei YU (1):
      ARM: dts: aspeed: palmetto: Fix flash_memory region

Tao Ren (1):
      ARM: dts: aspeed: cmm: enable iio-hwmon-adc

Vijay Khemka (1):
      ARM: dts: aspeed: tiogapass: Enable VUART

 arch/arm/boot/dts/aspeed-ast2500-evb.dts           | 21 ++++++++-
 arch/arm/boot/dts/aspeed-bmc-facebook-cmm.dts      |  6 +++
 .../arm/boot/dts/aspeed-bmc-facebook-tiogapass.dts |  5 +++
 arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts      |  4 +-
 arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts       |  8 ++++
 arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts   | 52 +++++++++++++++++++++-
 arch/arm/boot/dts/aspeed-g4.dtsi                   |  6 +++
 arch/arm/boot/dts/aspeed-g5.dtsi                   | 20 +++++++++
 8 files changed, 117 insertions(+), 5 deletions(-)

^ permalink raw reply

* [PATCH] ARM: dts: aspeed: Rename flash-controller nodes
From: Cédric Le Goater @ 2019-04-05  5:51 UTC (permalink / raw)
  To: linux-aspeed
In-Reply-To: <20190405033230.8150-1-joel@jms.id.au>

On 4/5/19 5:32 AM, Joel Stanley wrote:
> The device tree compiler has started spitting out warnings about these
> names, insisting they be called 'spi':
> 
>  ../arch/arm/boot/dts/aspeed-g5.dtsi:108.35-128.5: Warning
>  (spi_bus_bridge): /ahb/flash-controller at 1e631000: node name for SPI
>  buses should be 'spi'
> 
> Signed-off-by: Joel Stanley <joel@jms.id.au>



Reviewed-by: C?dric Le Goater <clg@kaod.org>

Thanks,

C.

> ---
>  arch/arm/boot/dts/aspeed-g4.dtsi | 4 ++--
>  arch/arm/boot/dts/aspeed-g5.dtsi | 6 +++---
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
> index 9549f867aa1e..5156afccc8ed 100644
> --- a/arch/arm/boot/dts/aspeed-g4.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
> @@ -53,7 +53,7 @@
>  		#size-cells = <1>;
>  		ranges;
>  
> -		fmc: flash-controller at 1e620000 {
> +		fmc: spi at 1e620000 {
>  			reg = < 0x1e620000 0x94
>  				0x20000000 0x10000000 >;
>  			#address-cells = <1>;
> @@ -69,7 +69,7 @@
>  			};
>  		};
>  
> -		spi: flash-controller at 1e630000 {
> +		spi: spi at 1e630000 {
>  			reg = < 0x1e630000 0x18
>  				0x30000000 0x10000000 >;
>  			#address-cells = <1>;
> diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
> index 85ed9dbec196..551528ccb7b8 100644
> --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> @@ -60,7 +60,7 @@
>  		#size-cells = <1>;
>  		ranges;
>  
> -		fmc: flash-controller at 1e620000 {
> +		fmc: spi at 1e620000 {
>  			reg = < 0x1e620000 0xc4
>  				0x20000000 0x10000000 >;
>  			#address-cells = <1>;
> @@ -86,7 +86,7 @@
>  			};
>  		};
>  
> -		spi1: flash-controller at 1e630000 {
> +		spi1: spi at 1e630000 {
>  			reg = < 0x1e630000 0xc4
>  				0x30000000 0x08000000 >;
>  			#address-cells = <1>;
> @@ -106,7 +106,7 @@
>  			};
>  		};
>  
> -		spi2: flash-controller at 1e631000 {
> +		spi2: spi at 1e631000 {
>  			reg = < 0x1e631000 0xc4
>  				0x38000000 0x08000000 >;
>  			#address-cells = <1>;
> 


^ permalink raw reply

* [PATCH 3/5] media: dt-bindings: aspeed-video: Add missing memory-region property
From: Rob Herring @ 2019-04-06  6:06 UTC (permalink / raw)
  To: linux-aspeed
In-Reply-To: <1554229504-5661-4-git-send-email-eajames@linux.ibm.com>

On Tue,  2 Apr 2019 18:25:02 +0000, Eddie James wrote:
> Missed documenting this property in the initial commit.
> 
> Signed-off-by: Eddie James <eajames@linux.ibm.com>
> ---
>  Documentation/devicetree/bindings/media/aspeed-video.txt | 6 ++++++
>  1 file changed, 6 insertions(+)
> 

Reviewed-by: Rob Herring <robh@kernel.org>


^ permalink raw reply

* [PATCH v3 1/3] dt-bindings: gpu: Add ASPEED GFX bindings document
From: Rob Herring @ 2019-04-06  6:06 UTC (permalink / raw)
  To: linux-aspeed
In-Reply-To: <20190403001909.31637-2-joel@jms.id.au>

On Wed, Apr 03, 2019 at 10:49:07AM +1030, Joel Stanley wrote:
> This describes the ASPEED BMC SoC's display controller.
> 
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> ---
> v3:
>  Add Andrew's reviewed-by
> 
>  .../devicetree/bindings/gpu/aspeed-gfx.txt    | 41 +++++++++++++++++++
>  1 file changed, 41 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/gpu/aspeed-gfx.txt
> 
> diff --git a/Documentation/devicetree/bindings/gpu/aspeed-gfx.txt b/Documentation/devicetree/bindings/gpu/aspeed-gfx.txt
> new file mode 100644
> index 000000000000..a74033332668
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/gpu/aspeed-gfx.txt
> @@ -0,0 +1,41 @@
> +Device tree configuration for the GFX display deivce on the AST2500 SoCs.
> +
> +Required properties:
> +  - compatible
> +    * Must be one of the following:
> +      + aspeed,ast2500-gfx
> +      + aspeed,ast2400-gfx
> +    * In addition, the ASPEED pinctrl bindings require the 'syscon' property to
> +      be present
> +
> +  - reg: Physical base address and length of the GFX registers
> +
> +  - interrupts: interrupt number for the GFX device
> +
> +  - clocks: clock number used to generate the pixel clock
> +
> +  - resets: reset line that must be released to use the GFX device
> +
> +  - memory-region:
> +    Phandle to a memory region to allocate from, as defined in
> +    Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt

If required, does that mean the h/w can only use certain memory? Why?

> +
> +
> +Example:
> +
> +gfx: display at 1e6e6000 {
> +	compatible = "aspeed,ast2500-gfx", "syscon";
> +	reg = <0x1e6e6000 0x1000>;
> +	reg-io-width = <4>;

Not documented as used. This should be implied by the compatible though.

> +	clocks = <&syscon ASPEED_CLK_GATE_D1CLK>;
> +	resets = <&syscon ASPEED_RESET_CRT1>;
> +	interrupts = <0x19>;
> +	memory-region = <&gfx_memory>;
> +};
> +
> +gfx_memory: framebuffer {
> +	size = <0x01000000>;
> +	alignment = <0x01000000>;
> +	compatible = "shared-dma-pool";
> +	reusable;
> +};
> -- 
> 2.20.1
> 


^ permalink raw reply

* [PATCH] ARM: dts: aspeed: Rename flash-controller nodes
From: Andrew Jeffery @ 2019-04-08  0:38 UTC (permalink / raw)
  To: linux-aspeed
In-Reply-To: <20190405033230.8150-1-joel@jms.id.au>



On Fri, 5 Apr 2019, at 14:02, Joel Stanley wrote:
> The device tree compiler has started spitting out warnings about these
> names, insisting they be called 'spi':
> 
>  ../arch/arm/boot/dts/aspeed-g5.dtsi:108.35-128.5: Warning
>  (spi_bus_bridge): /ahb/flash-controller at 1e631000: node name for SPI
>  buses should be 'spi'
> 
> Signed-off-by: Joel Stanley <joel@jms.id.au>

Reviewed-by: Andrew Jeffery <andrew@aj.id.au>

> ---
>  arch/arm/boot/dts/aspeed-g4.dtsi | 4 ++--
>  arch/arm/boot/dts/aspeed-g5.dtsi | 6 +++---
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
> index 9549f867aa1e..5156afccc8ed 100644
> --- a/arch/arm/boot/dts/aspeed-g4.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
> @@ -53,7 +53,7 @@
>  		#size-cells = <1>;
>  		ranges;
>  
> -		fmc: flash-controller at 1e620000 {
> +		fmc: spi at 1e620000 {
>  			reg = < 0x1e620000 0x94
>  				0x20000000 0x10000000 >;
>  			#address-cells = <1>;
> @@ -69,7 +69,7 @@
>  			};
>  		};
>  
> -		spi: flash-controller at 1e630000 {
> +		spi: spi at 1e630000 {
>  			reg = < 0x1e630000 0x18
>  				0x30000000 0x10000000 >;
>  			#address-cells = <1>;
> diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
> index 85ed9dbec196..551528ccb7b8 100644
> --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> @@ -60,7 +60,7 @@
>  		#size-cells = <1>;
>  		ranges;
>  
> -		fmc: flash-controller at 1e620000 {
> +		fmc: spi at 1e620000 {
>  			reg = < 0x1e620000 0xc4
>  				0x20000000 0x10000000 >;
>  			#address-cells = <1>;
> @@ -86,7 +86,7 @@
>  			};
>  		};
>  
> -		spi1: flash-controller at 1e630000 {
> +		spi1: spi at 1e630000 {
>  			reg = < 0x1e630000 0xc4
>  				0x30000000 0x08000000 >;
>  			#address-cells = <1>;
> @@ -106,7 +106,7 @@
>  			};
>  		};
>  
> -		spi2: flash-controller at 1e631000 {
> +		spi2: spi at 1e631000 {
>  			reg = < 0x1e631000 0xc4
>  				0x38000000 0x08000000 >;
>  			#address-cells = <1>;
> -- 
> 2.20.1
> 
>

^ permalink raw reply

* Re: [PATCH v2] ARM: dts: aspeed: Add Power9 and Power9 CFAM description
From: Andrew Jeffery @ 2019-04-08  1:23 UTC (permalink / raw)
  To: linux-aspeed
In-Reply-To: <20190405031416.10084-1-joel@jms.id.au>



On Fri, 5 Apr 2019, at 13:44, Joel Stanley wrote:
> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> 
> To be used by the OpenPower BMC machines.
> 
> This provides proper chip IDs but also adds the various sub-devices
> necessary for the future OCC driver among other. All the added nodes
> comply with the existing upstream FSI bindings.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
> v2: The first version of this used a bit more magic and was nak'd by
> Olof. I've reworked it to not use macros. It still needs to be included
> in the parent device tree after the fsi node is created.
> 
>  arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts  |   2 +
>  arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts |  22 ++
>  arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts  |   8 +
>  .../boot/dts/aspeed-bmc-opp-witherspoon.dts   |   2 +
>  arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts    |   2 +
>  arch/arm/boot/dts/ibm-power9-dual.dtsi        | 248 ++++++++++++++++++
>  6 files changed, 284 insertions(+)
>  create mode 100644 arch/arm/boot/dts/ibm-power9-dual.dtsi
> 
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts 
> b/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
> index 024e52a6cd0f..de95112e2a04 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-lanyang.dts
> @@ -322,3 +322,5 @@
>  &adc {
>  	status = "okay";
>  };
> +
> +#include "ibm-power9-dual.dtsi"
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts 
> b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
> index b249da80fb83..b0cb34ccb135 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
> @@ -347,3 +347,25 @@
>  		line-name = "BMC_TPM_INT_N";
>  	};
>  };
> +
> +&fsi {
> +	cfam at 0,0 {
> +		reg = <0 0>;
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		chip-id = <0>;
> +
> +		scom at 1000 {
> +			compatible = "ibm,fsi2pib";
> +			reg = <0x1000 0x400>;
> +		};
> +
> +		fsi_hub0: hub at 3400 {
> +			compatible = "ibm,fsi-master-hub";
> +			reg = <0x3400 0x400>;

Maybe I'll learn something here: the workbook suggests the size is 0x1000,
however, that would mean it's not naturally aligned, so that feels wrong.
But where did 0x400 come from?

> +			#address-cells = <2>;
> +			#size-cells = <0>;
> +			no-scan-on-init;
> +		};
> +	};
> +};
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts 
> b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> index 76fe994f2ba4..5a6bbb3b6640 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> @@ -296,3 +296,11 @@
>  &adc {
>  	status = "okay";
>  };
> +
> +&gfx {
> +     status = "okay";
> +     memory-region = <&gfx_memory>;
> +};

Unrelated?

Otherwise:

Reviewed-by: Andrew Jeffery <andrew@aj.id.au>

> +
> +#include "ibm-power9-dual.dtsi"
> +
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts 
> b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> index ad54117c075e..a0a4a0c6bc2a 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> @@ -592,3 +592,5 @@
>  &adc {
>  	status = "okay";
>  };
> +
> +#include "ibm-power9-dual.dtsi"
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts 
> b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> index 2c5aa90a546d..05df11cacb21 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-zaius.dts
> @@ -435,3 +435,5 @@
>  &ibt {
>  	status = "okay";
>  };
> +
> +#include "ibm-power9-dual.dtsi"
> diff --git a/arch/arm/boot/dts/ibm-power9-dual.dtsi 
> b/arch/arm/boot/dts/ibm-power9-dual.dtsi
> new file mode 100644
> index 000000000000..2abc42eda7b0
> --- /dev/null
> +++ b/arch/arm/boot/dts/ibm-power9-dual.dtsi
> @@ -0,0 +1,248 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +// Copyright 2018 IBM Corp
> +
> +&fsi {
> +	cfam at 0,0 {
> +		reg = <0 0>;
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		chip-id = <0>;
> +
> +		scom at 1000 {
> +			compatible = "ibm,fsi2pib";
> +			reg = <0x1000 0x400>;
> +		};
> +
> +		i2c at 1800 {
> +			compatible = "ibm,fsi-i2c-master";
> +			reg = <0x1800 0x400>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			cfam0_i2c0: i2c-bus at 0 {
> +				reg = <0>;
> +			};
> +
> +			cfam0_i2c1: i2c-bus at 1 {
> +				reg = <1>;
> +			};
> +
> +			cfam0_i2c2: i2c-bus at 2 {
> +				reg = <2>;
> +			};
> +
> +			cfam0_i2c3: i2c-bus at 3 {
> +				reg = <3>;
> +			};
> +
> +			cfam0_i2c4: i2c-bus at 4 {
> +				reg = <4>;
> +			};
> +
> +			cfam0_i2c5: i2c-bus at 5 {
> +				reg = <5>;
> +			};
> +
> +			cfam0_i2c6: i2c-bus at 6 {
> +				reg = <6>;
> +			};
> +
> +			cfam0_i2c7: i2c-bus at 7 {
> +				reg = <7>;
> +			};
> +
> +			cfam0_i2c8: i2c-bus at 8 {
> +				reg = <8>;
> +			};
> +
> +			cfam0_i2c9: i2c-bus at 9 {
> +				reg = <9>;
> +			};
> +
> +			cfam0_i2c10: i2c-bus at a {
> +				reg = <10>;
> +			};
> +
> +			cfam0_i2c11: i2c-bus at b {
> +				reg = <11>;
> +			};
> +
> +			cfam0_i2c12: i2c-bus at c {
> +				reg = <12>;
> +			};
> +
> +			cfam0_i2c13: i2c-bus at d {
> +				reg = <13>;
> +			};
> +
> +			cfam0_i2c14: i2c-bus at e {
> +				reg = <14>;
> +			};
> +		};
> +
> +		sbefifo at 2400 {
> +			compatible = "ibm,p9-sbefifo";
> +			reg = <0x2400 0x400>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			fsi_occ0: occ {
> +				compatible = "ibm,p9-occ";
> +			};
> +		};
> +
> +		fsi_hub0: hub at 3400 {
> +			compatible = "fsi-master-hub";
> +			reg = <0x3400 0x400>;
> +			#address-cells = <2>;
> +			#size-cells = <0>;
> +
> +			no-scan-on-init;
> +		};
> +	};
> +};
> +
> +&fsi_hub0 {
> +	cfam at 1,0 {
> +		reg = <1 0>;
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		chip-id = <1>;
> +
> +		scom at 1000 {
> +			compatible = "ibm,fsi2pib";
> +			reg = <0x1000 0x400>;
> +		};
> +
> +		i2c at 1800 {
> +			compatible = "ibm,fsi-i2c-master";
> +			reg = <0x1800 0x400>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			cfam1_i2c0: i2c-bus at 0 {
> +				reg = <0>;
> +			};
> +
> +			cfam1_i2c1: i2c-bus at 1 {
> +				reg = <1>;
> +			};
> +
> +			cfam1_i2c2: i2c-bus at 2 {
> +				reg = <2>;
> +			};
> +
> +			cfam1_i2c3: i2c-bus at 3 {
> +				reg = <3>;
> +			};
> +
> +			cfam1_i2c4: i2c-bus at 4 {
> +				reg = <4>;
> +			};
> +
> +			cfam1_i2c5: i2c-bus at 5 {
> +				reg = <5>;
> +			};
> +
> +			cfam1_i2c6: i2c-bus at 6 {
> +				reg = <6>;
> +			};
> +
> +			cfam1_i2c7: i2c-bus at 7 {
> +				reg = <7>;
> +			};
> +
> +			cfam1_i2c8: i2c-bus at 8 {
> +				reg = <8>;
> +			};
> +
> +			cfam1_i2c9: i2c-bus at 9 {
> +				reg = <9>;
> +			};
> +
> +			cfam1_i2c10: i2c-bus at a {
> +				reg = <10>;
> +			};
> +
> +			cfam1_i2c11: i2c-bus at b {
> +				reg = <11>;
> +			};
> +
> +			cfam1_i2c12: i2c-bus at c {
> +				reg = <12>;
> +			};
> +
> +			cfam1_i2c13: i2c-bus at d {
> +				reg = <13>;
> +			};
> +
> +			cfam1_i2c14: i2c-bus at e {
> +				reg = <14>;
> +			};
> +		};
> +
> +		sbefifo at 2400 {
> +			compatible = "ibm,p9-sbefifo";
> +			reg = <0x2400 0x400>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			fsi_occ1: occ {
> +				compatible = "ibm,p9-occ";
> +			};
> +		};
> +
> +		fsi_hub1: hub at 3400 {
> +			compatible = "fsi-master-hub";
> +			reg = <0x3400 0x400>;
> +			#address-cells = <2>;
> +			#size-cells = <0>;
> +
> +			no-scan-on-init;
> +		};
> +	};
> +};
> +
> +/* Legacy OCC numbering (to get rid of when userspace is fixed) */
> +&fsi_occ0 {
> +	reg = <1>;
> +};
> +
> +&fsi_occ1 {
> +	reg = <2>;
> +};
> +
> +/ {
> +	aliases {
> +		i2c100 = &cfam0_i2c0;
> +		i2c101 = &cfam0_i2c1;
> +		i2c102 = &cfam0_i2c2;
> +		i2c103 = &cfam0_i2c3;
> +		i2c104 = &cfam0_i2c4;
> +		i2c105 = &cfam0_i2c5;
> +		i2c106 = &cfam0_i2c6;
> +		i2c107 = &cfam0_i2c7;
> +		i2c108 = &cfam0_i2c8;
> +		i2c109 = &cfam0_i2c9;
> +		i2c110 = &cfam0_i2c10;
> +		i2c111 = &cfam0_i2c11;
> +		i2c112 = &cfam0_i2c12;
> +		i2c113 = &cfam0_i2c13;
> +		i2c114 = &cfam0_i2c14;
> +		i2c200 = &cfam1_i2c0;
> +		i2c201 = &cfam1_i2c1;
> +		i2c202 = &cfam1_i2c2;
> +		i2c203 = &cfam1_i2c3;
> +		i2c204 = &cfam1_i2c4;
> +		i2c205 = &cfam1_i2c5;
> +		i2c206 = &cfam1_i2c6;
> +		i2c207 = &cfam1_i2c7;
> +		i2c208 = &cfam1_i2c8;
> +		i2c209 = &cfam1_i2c9;
> +		i2c210 = &cfam1_i2c10;
> +		i2c211 = &cfam1_i2c11;
> +		i2c212 = &cfam1_i2c12;
> +		i2c213 = &cfam1_i2c13;
> +		i2c214 = &cfam1_i2c14;
> +	};
> +};
> -- 
> 2.20.1
> 
>

^ permalink raw reply

* [PATCH v9 1/2] dt-bindings: misc: aspeed-p2a-ctrl: add support
From: Andrew Jeffery @ 2019-04-08  2:03 UTC (permalink / raw)
  To: linux-aspeed
In-Reply-To: <20190404152544.214988-1-venture@google.com>



On Fri, 5 Apr 2019, at 01:55, Patrick Venture wrote:
> Document the ast2400, ast2500 PCI-to-AHB bridge control driver bindings.
> 
> Signed-off-by: Patrick Venture <venture@google.com>
> Reviewed-by: Rob Herring <robh@kernel.org>
> ---
> Changes for v9:
>  - Added missing details about syscon parent
> Changes for v8:
> - None
> Changes for v7:
> - Moved node under the syscon node it requires
> Changes for v6:
> - None
> Changes for v5:
> - None
> Changes for v4:
> - None
> Changes for v3:
> - None
> Changes for v2:
> - Added comment about syscon required parameter.
> ---
>  .../bindings/misc/aspeed-p2a-ctrl.txt         | 56 +++++++++++++++++++
>  1 file changed, 56 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
> 
> diff --git a/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt 
> b/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
> new file mode 100644
> index 0000000000000..05ed654848b60
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
> @@ -0,0 +1,56 @@
> +======================================================================
> +Device tree bindings for Aspeed AST2400/AST2500 PCI-to-AHB Bridge 
> Control Driver
> +======================================================================
> +
> +The bridge is available on platforms with the VGA enabled on the 
> Aspeed device.
> +In this case, the host has access to a 64KiB window into all of the 
> BMC's
> +memory.  The BMC can disable this bridge.  If the bridge is enabled, 
> the host
> +has read access to all the regions of memory, however the host only 
> has read
> +and write access depending on a register controlled by the BMC.
> +
> +Required properties:
> +===================
> +
> + - compatible: must be one of:
> +	- "aspeed,ast2400-p2a-ctrl"
> +	- "aspeed,ast2500-p2a-ctrl"
> +
> +Optional properties:
> +===================
> +
> +- memory-region: A phandle to a reserved_memory region to be used for 
> the PCI
> +		to AHB mapping
> +
> +The p2a-control node should be the child of a syscon node with the 
> required
> +property:
> +
> +- compatible : Should be one of the following:
> +		"aspeed,ast2400-scu", "syscon", "simple-mfd"
> +		"aspeed,g4-scu", "syscon", "simple-mfd"
> +		"aspeed,ast2500-scu", "syscon", "simple-mfd"
> +		"aspeed,g5-scu", "syscon", "simple-mfd"
> +
> +The aspeed-p2a-ctrl node should be the child of a syscon node with the 
> required
> +property:
> +
> +- compatible : Should be one of the following:
> +		"aspeed,ast2400-scu", "syscon", "simple-mfd"
> +		"aspeed,g4-scu", "syscon", "simple-mfd"
> +		"aspeed,ast2500-scu", "syscon", "simple-mfd"
> +		"aspeed,g5-scu", "syscon", "simple-mfd"

Agh, now the info's here twice!

Next time, surely :D

Unless Greg or Rob want to chop one out as they apply it? It looks good to
me otherwise.

Andrew

> +
> +Example
> +===================
> +
> +g4 Example
> +----------
> +
> +syscon: scu at 1e6e2000 {
> +	compatible = "aspeed,ast2400-scu", "syscon", "simple-mfd";
> +	reg = <0x1e6e2000 0x1a8>;
> +
> +	p2a: p2a-control {
> +		compatible = "aspeed,ast2400-p2a-ctrl";
> +		memory-region = <&reserved_memory>;
> +	};
> +};
> -- 
> 2.21.0.392.gf8f6787159e-goog
> 
>

^ permalink raw reply

* [PATCH v9 1/2] dt-bindings: misc: aspeed-p2a-ctrl: add support
From: Patrick Venture @ 2019-04-08 14:12 UTC (permalink / raw)
  To: linux-aspeed
In-Reply-To: <8c412bc4-6528-4496-a912-f098604e707b@www.fastmail.com>

On Sun, Apr 7, 2019 at 7:03 PM Andrew Jeffery <andrew@aj.id.au> wrote:
>
>
>
> On Fri, 5 Apr 2019, at 01:55, Patrick Venture wrote:
> > Document the ast2400, ast2500 PCI-to-AHB bridge control driver bindings.
> >
> > Signed-off-by: Patrick Venture <venture@google.com>
> > Reviewed-by: Rob Herring <robh@kernel.org>
> > ---
> > Changes for v9:
> >  - Added missing details about syscon parent
> > Changes for v8:
> > - None
> > Changes for v7:
> > - Moved node under the syscon node it requires
> > Changes for v6:
> > - None
> > Changes for v5:
> > - None
> > Changes for v4:
> > - None
> > Changes for v3:
> > - None
> > Changes for v2:
> > - Added comment about syscon required parameter.
> > ---
> >  .../bindings/misc/aspeed-p2a-ctrl.txt         | 56 +++++++++++++++++++
> >  1 file changed, 56 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
> >
> > diff --git a/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
> > b/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
> > new file mode 100644
> > index 0000000000000..05ed654848b60
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
> > @@ -0,0 +1,56 @@
> > +======================================================================
> > +Device tree bindings for Aspeed AST2400/AST2500 PCI-to-AHB Bridge
> > Control Driver
> > +======================================================================
> > +
> > +The bridge is available on platforms with the VGA enabled on the
> > Aspeed device.
> > +In this case, the host has access to a 64KiB window into all of the
> > BMC's
> > +memory.  The BMC can disable this bridge.  If the bridge is enabled,
> > the host
> > +has read access to all the regions of memory, however the host only
> > has read
> > +and write access depending on a register controlled by the BMC.
> > +
> > +Required properties:
> > +===================
> > +
> > + - compatible: must be one of:
> > +     - "aspeed,ast2400-p2a-ctrl"
> > +     - "aspeed,ast2500-p2a-ctrl"
> > +
> > +Optional properties:
> > +===================
> > +
> > +- memory-region: A phandle to a reserved_memory region to be used for
> > the PCI
> > +             to AHB mapping
> > +
> > +The p2a-control node should be the child of a syscon node with the
> > required
> > +property:
> > +
> > +- compatible : Should be one of the following:
> > +             "aspeed,ast2400-scu", "syscon", "simple-mfd"
> > +             "aspeed,g4-scu", "syscon", "simple-mfd"
> > +             "aspeed,ast2500-scu", "syscon", "simple-mfd"
> > +             "aspeed,g5-scu", "syscon", "simple-mfd"
> > +
> > +The aspeed-p2a-ctrl node should be the child of a syscon node with the
> > required
> > +property:
> > +
> > +- compatible : Should be one of the following:
> > +             "aspeed,ast2400-scu", "syscon", "simple-mfd"
> > +             "aspeed,g4-scu", "syscon", "simple-mfd"
> > +             "aspeed,ast2500-scu", "syscon", "simple-mfd"
> > +             "aspeed,g5-scu", "syscon", "simple-mfd"
>
> Agh, now the info's here twice!

Agh!  I don't even know how that happened.  Perhaps I was overzealous
in my pasting!  I can fix it.

>
> Next time, surely :D
>
> Unless Greg or Rob want to chop one out as they apply it? It looks good to
> me otherwise.
>
> Andrew
>
> > +
> > +Example
> > +===================
> > +
> > +g4 Example
> > +----------
> > +
> > +syscon: scu at 1e6e2000 {
> > +     compatible = "aspeed,ast2400-scu", "syscon", "simple-mfd";
> > +     reg = <0x1e6e2000 0x1a8>;
> > +
> > +     p2a: p2a-control {
> > +             compatible = "aspeed,ast2400-p2a-ctrl";
> > +             memory-region = <&reserved_memory>;
> > +     };
> > +};
> > --
> > 2.21.0.392.gf8f6787159e-goog
> >
> >

^ permalink raw reply

* [PATCH v10 1/2] dt-bindings: misc: aspeed-p2a-ctrl: add support
From: Patrick Venture @ 2019-04-08 14:42 UTC (permalink / raw)
  To: linux-aspeed

Document the ast2400, ast2500 PCI-to-AHB bridge control driver bindings.

Signed-off-by: Patrick Venture <venture@google.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changes for v10:
 - Chopped out nearly identical information.
Changes for v9:
 - Added missing details about syscon parent
Changes for v8:
- None
Changes for v7:
- Moved node under the syscon node it requires
Changes for v6:
- None
Changes for v5:
- None
Changes for v4:
- None
Changes for v3:
- None
Changes for v2:
- Added comment about syscon required parameter.
---
 .../bindings/misc/aspeed-p2a-ctrl.txt         | 47 +++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt

diff --git a/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt b/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
new file mode 100644
index 0000000000000..854bd67ffec68
--- /dev/null
+++ b/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
@@ -0,0 +1,47 @@
+======================================================================
+Device tree bindings for Aspeed AST2400/AST2500 PCI-to-AHB Bridge Control Driver
+======================================================================
+
+The bridge is available on platforms with the VGA enabled on the Aspeed device.
+In this case, the host has access to a 64KiB window into all of the BMC's
+memory.  The BMC can disable this bridge.  If the bridge is enabled, the host
+has read access to all the regions of memory, however the host only has read
+and write access depending on a register controlled by the BMC.
+
+Required properties:
+===================
+
+ - compatible: must be one of:
+	- "aspeed,ast2400-p2a-ctrl"
+	- "aspeed,ast2500-p2a-ctrl"
+
+Optional properties:
+===================
+
+- memory-region: A phandle to a reserved_memory region to be used for the PCI
+		to AHB mapping
+
+The p2a-control node should be the child of a syscon node with the required
+property:
+
+- compatible : Should be one of the following:
+		"aspeed,ast2400-scu", "syscon", "simple-mfd"
+		"aspeed,g4-scu", "syscon", "simple-mfd"
+		"aspeed,ast2500-scu", "syscon", "simple-mfd"
+		"aspeed,g5-scu", "syscon", "simple-mfd"
+
+Example
+===================
+
+g4 Example
+----------
+
+syscon: scu at 1e6e2000 {
+	compatible = "aspeed,ast2400-scu", "syscon", "simple-mfd";
+	reg = <0x1e6e2000 0x1a8>;
+
+	p2a: p2a-control {
+		compatible = "aspeed,ast2400-p2a-ctrl";
+		memory-region = <&reserved_memory>;
+	};
+};
-- 
2.21.0.392.gf8f6787159e-goog


^ permalink raw reply related

* [PATCH v10 2/2] drivers/misc: Add Aspeed P2A control driver
From: Patrick Venture @ 2019-04-08 14:42 UTC (permalink / raw)
  To: linux-aspeed

The ASPEED AST2400, and AST2500 in some configurations include a
PCI-to-AHB MMIO bridge.  This bridge allows a server to read and write
in the BMC's physical address space.  This feature is especially useful
when using this bridge to send large files to the BMC.

The host may use this to send down a firmware image by staging data at a
specific memory address, and in a coordinated effort with the BMC's
software stack and kernel, transmit the bytes.

This driver enables the BMC to unlock the PCI bridge on demand, and
configure it via ioctl to allow the host to write bytes to an agreed
upon location.  In the primary use-case, the region to use is known
apriori on the BMC, and the host requests this information.  Once this
request is received, the BMC's software stack will enable the bridge and
the region and then using some software flow control (possibly via IPMI
packets), copy the bytes down.  Once the process is complete, the BMC
will disable the bridge and unset any region involved.

The default behavior of this bridge when present is: enabled and all
regions marked read-write.  This driver will fix the regions to be
read-only and then disable the bridge entirely.

The memory regions protected are:
 * BMC flash MMIO window
 * System flash MMIO windows
 * SOC IO (peripheral MMIO)
 * DRAM

The DRAM region itself is all of DRAM and cannot be further specified.
Once the PCI bridge is enabled, the host can read all of DRAM, and if
the DRAM section is write-enabled, then it can write to all of it.

Signed-off-by: Patrick Venture <venture@google.com>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
---
Changes for v10:
 - None
Changes for v9:
 - Stop zeroing out memory that is already zeroed out.
Changes for v8:
 - Promoted u32 address values to u64 to be compatible with either.
Changes for v7:
- Moved node under the syscon node and changed therefore how it grabs the phandle for the regmap.
Changes for v6:
- Cleaned up documentation
- Added missing machine-readable copyright lines.
- Fixed over 80 chars instances.
- Changed error from invalid memory-region node to ENODEV.
Changes for v5:
- Fixup missing exit condition and remove extra jump.
Changes for v4:
- Added ioctl for reading back the memory-region configuration.
- Cleaned up some unused variables.
Changes for v3:
- Deleted unused read and write methods.
Changes for v2:
- Dropped unused reads.
- Moved call to disable bridge to before registering device.
- Switch from using regs to using a syscon regmap. <<< IN PROGRESS
- Updated the commit message. <<< TODO
- Updated the bit flipped for SCU180_ENP2A
- Dropped boolean region_specified variable.
- Renamed p2a_ctrl in _probe to misc_ctrl per suggestion.
- Renamed aspeed_p2a_region_search to aspeed_p2a_region_acquire
- Updated commit message.
---
 drivers/misc/Kconfig                 |   8 +
 drivers/misc/Makefile                |   1 +
 drivers/misc/aspeed-p2a-ctrl.c       | 443 +++++++++++++++++++++++++++
 include/uapi/linux/aspeed-p2a-ctrl.h |  62 ++++
 4 files changed, 514 insertions(+)
 create mode 100644 drivers/misc/aspeed-p2a-ctrl.c
 create mode 100644 include/uapi/linux/aspeed-p2a-ctrl.h

diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig
index 42ab8ec92a046..3209ee020b153 100644
--- a/drivers/misc/Kconfig
+++ b/drivers/misc/Kconfig
@@ -496,6 +496,14 @@ config VEXPRESS_SYSCFG
 	  bus. System Configuration interface is one of the possible means
 	  of generating transactions on this bus.
 
+config ASPEED_P2A_CTRL
+	depends on (ARCH_ASPEED || COMPILE_TEST) && REGMAP && MFD_SYSCON
+	tristate "Aspeed ast2400/2500 HOST P2A VGA MMIO to BMC bridge control"
+	help
+	  Control Aspeed ast2400/2500 HOST P2A VGA MMIO to BMC mappings through
+	  ioctl()s, the driver also provides an interface for userspace mappings to
+	  a pre-defined region.
+
 config ASPEED_LPC_CTRL
 	depends on (ARCH_ASPEED || COMPILE_TEST) && REGMAP && MFD_SYSCON
 	tristate "Aspeed ast2400/2500 HOST LPC to BMC bridge control"
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index d5b7d3404dc78..c36239573a5ca 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -56,6 +56,7 @@ obj-$(CONFIG_VEXPRESS_SYSCFG)	+= vexpress-syscfg.o
 obj-$(CONFIG_CXL_BASE)		+= cxl/
 obj-$(CONFIG_ASPEED_LPC_CTRL)	+= aspeed-lpc-ctrl.o
 obj-$(CONFIG_ASPEED_LPC_SNOOP)	+= aspeed-lpc-snoop.o
+obj-$(CONFIG_ASPEED_P2A_CTRL)	+= aspeed-p2a-ctrl.o
 obj-$(CONFIG_PCI_ENDPOINT_TEST)	+= pci_endpoint_test.o
 obj-$(CONFIG_OCXL)		+= ocxl/
 obj-y				+= cardreader/
diff --git a/drivers/misc/aspeed-p2a-ctrl.c b/drivers/misc/aspeed-p2a-ctrl.c
new file mode 100644
index 0000000000000..c0521b2ffc6ac
--- /dev/null
+++ b/drivers/misc/aspeed-p2a-ctrl.c
@@ -0,0 +1,443 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright 2019 Google Inc
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * Provides a simple driver to control the ASPEED P2A interface which allows
+ * the host to read and write to various regions of the BMC's memory.
+ */
+
+#include <linux/fs.h>
+#include <linux/io.h>
+#include <linux/mfd/syscon.h>
+#include <linux/miscdevice.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/mutex.h>
+#include <linux/of_address.h>
+#include <linux/of_device.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+#include <linux/slab.h>
+#include <linux/uaccess.h>
+
+#include <linux/aspeed-p2a-ctrl.h>
+
+#define DEVICE_NAME	"aspeed-p2a-ctrl"
+
+/* SCU2C is a Misc. Control Register. */
+#define SCU2C 0x2c
+/* SCU180 is the PCIe Configuration Setting Control Register. */
+#define SCU180 0x180
+/* Bit 1 controls the P2A bridge, while bit 0 controls the entire VGA device
+ * on the PCI bus.
+ */
+#define SCU180_ENP2A BIT(1)
+
+/* The ast2400/2500 both have six ranges. */
+#define P2A_REGION_COUNT 6
+
+struct region {
+	u64 min;
+	u64 max;
+	u32 bit;
+};
+
+struct aspeed_p2a_model_data {
+	/* min, max, bit */
+	struct region regions[P2A_REGION_COUNT];
+};
+
+struct aspeed_p2a_ctrl {
+	struct miscdevice miscdev;
+	struct regmap *regmap;
+
+	const struct aspeed_p2a_model_data *config;
+
+	/* Access to these needs to be locked, held via probe, mapping ioctl,
+	 * and release, remove.
+	 */
+	struct mutex tracking;
+	u32 readers;
+	u32 readerwriters[P2A_REGION_COUNT];
+
+	phys_addr_t mem_base;
+	resource_size_t mem_size;
+};
+
+struct aspeed_p2a_user {
+	struct file *file;
+	struct aspeed_p2a_ctrl *parent;
+
+	/* The entire memory space is opened for reading once the bridge is
+	 * enabled, therefore this needs only to be tracked once per user.
+	 * If any user has it open for read, the bridge must stay enabled.
+	 */
+	u32 read;
+
+	/* Each entry of the array corresponds to a P2A Region.  If the user
+	 * opens for read or readwrite, the reference goes up here.  On
+	 * release, this array is walked and references adjusted accordingly.
+	 */
+	u32 readwrite[P2A_REGION_COUNT];
+};
+
+static void aspeed_p2a_enable_bridge(struct aspeed_p2a_ctrl *p2a_ctrl)
+{
+	regmap_update_bits(p2a_ctrl->regmap,
+		SCU180, SCU180_ENP2A, SCU180_ENP2A);
+}
+
+static void aspeed_p2a_disable_bridge(struct aspeed_p2a_ctrl *p2a_ctrl)
+{
+	regmap_update_bits(p2a_ctrl->regmap, SCU180, SCU180_ENP2A, 0);
+}
+
+static int aspeed_p2a_mmap(struct file *file, struct vm_area_struct *vma)
+{
+	struct aspeed_p2a_user *priv = file->private_data;
+	struct aspeed_p2a_ctrl *ctrl = priv->parent;
+
+	if (ctrl->mem_base == 0 && ctrl->mem_size == 0)
+		return -EINVAL;
+
+	unsigned long vsize = vma->vm_end - vma->vm_start;
+	pgprot_t prot = vma->vm_page_prot;
+
+	if (vma->vm_pgoff + vsize > ctrl->mem_base + ctrl->mem_size)
+		return -EINVAL;
+
+	/* ast2400/2500 AHB accesses are not cache coherent */
+	prot = pgprot_noncached(prot);
+
+	if (remap_pfn_range(vma, vma->vm_start,
+		(ctrl->mem_base >> PAGE_SHIFT) + vma->vm_pgoff,
+		vsize, prot))
+		return -EAGAIN;
+
+	return 0;
+}
+
+static bool aspeed_p2a_region_acquire(struct aspeed_p2a_user *priv,
+		struct aspeed_p2a_ctrl *ctrl,
+		struct aspeed_p2a_ctrl_mapping *map)
+{
+	int i;
+	u64 base, end;
+	bool matched = false;
+
+	base = map->addr;
+	end = map->addr + (map->length - 1);
+
+	/* If the value is a legal u32, it will find a match. */
+	for (i = 0; i < P2A_REGION_COUNT; i++) {
+		const struct region *curr = &ctrl->config->regions[i];
+
+		/* If the top of this region is lower than your base, skip it.
+		 */
+		if (curr->max < base)
+			continue;
+
+		/* If the bottom of this region is higher than your end, bail.
+		 */
+		if (curr->min > end)
+			break;
+
+		/* Lock this and update it, therefore it someone else is
+		 * closing their file out, this'll preserve the increment.
+		 */
+		mutex_lock(&ctrl->tracking);
+		ctrl->readerwriters[i] += 1;
+		mutex_unlock(&ctrl->tracking);
+
+		/* Track with the user, so when they close their file, we can
+		 * decrement properly.
+		 */
+		priv->readwrite[i] += 1;
+
+		/* Enable the region as read-write. */
+		regmap_update_bits(ctrl->regmap, SCU2C, curr->bit, 0);
+		matched = true;
+	}
+
+	return matched;
+}
+
+static long aspeed_p2a_ioctl(struct file *file, unsigned int cmd,
+		unsigned long data)
+{
+	struct aspeed_p2a_user *priv = file->private_data;
+	struct aspeed_p2a_ctrl *ctrl = priv->parent;
+	void __user *arg = (void __user *)data;
+	struct aspeed_p2a_ctrl_mapping map;
+
+	if (copy_from_user(&map, arg, sizeof(map)))
+		return -EFAULT;
+
+	switch (cmd) {
+	case ASPEED_P2A_CTRL_IOCTL_SET_WINDOW:
+		/* If they want a region to be read-only, since the entire
+		 * region is read-only once enabled, we just need to track this
+		 * user wants to read from the bridge, and if it's not enabled.
+		 * Enable it.
+		 */
+		if (map.flags == ASPEED_P2A_CTRL_READ_ONLY) {
+			mutex_lock(&ctrl->tracking);
+			ctrl->readers += 1;
+			mutex_unlock(&ctrl->tracking);
+
+			/* Track with the user, so when they close their file,
+			 * we can decrement properly.
+			 */
+			priv->read += 1;
+		} else if (map.flags == ASPEED_P2A_CTRL_READWRITE) {
+			/* If we don't acquire any region return error. */
+			if (!aspeed_p2a_region_acquire(priv, ctrl, &map)) {
+				return -EINVAL;
+			}
+		} else {
+			/* Invalid map flags. */
+			return -EINVAL;
+		}
+
+		aspeed_p2a_enable_bridge(ctrl);
+		return 0;
+	case ASPEED_P2A_CTRL_IOCTL_GET_MEMORY_CONFIG:
+		/* This is a request for the memory-region and corresponding
+		 * length that is used by the driver for mmap.
+		 */
+
+		map.flags = 0;
+		map.addr = ctrl->mem_base;
+		map.length = ctrl->mem_size;
+
+		return copy_to_user(arg, &map, sizeof(map)) ? -EFAULT : 0;
+	}
+
+	return -EINVAL;
+}
+
+
+/*
+ * When a user opens this file, we create a structure to track their mappings.
+ *
+ * A user can map a region as read-only (bridge enabled), or read-write (bit
+ * flipped, and bridge enabled).  Either way, this tracking is used, s.t. when
+ * they release the device references are handled.
+ *
+ * The bridge is not enabled until a user calls an ioctl to map a region,
+ * simply opening the device does not enable it.
+ */
+static int aspeed_p2a_open(struct inode *inode, struct file *file)
+{
+	struct aspeed_p2a_user *priv;
+
+	priv = kmalloc(sizeof(*priv), GFP_KERNEL);
+	if (!priv)
+		return -ENOMEM;
+
+	priv->file = file;
+	priv->read = 0;
+	memset(priv->readwrite, 0, sizeof(priv->readwrite));
+
+	/* The file's private_data is initialized to the p2a_ctrl. */
+	priv->parent = file->private_data;
+
+	/* Set the file's private_data to the user's data. */
+	file->private_data = priv;
+
+	return 0;
+}
+
+/*
+ * This will close the users mappings.  It will go through what they had opened
+ * for readwrite, and decrement those counts.  If at the end, this is the last
+ * user, it'll close the bridge.
+ */
+static int aspeed_p2a_release(struct inode *inode, struct file *file)
+{
+	int i;
+	u32 value;
+	u32 bits = 0;
+	bool open_regions = false;
+	struct aspeed_p2a_user *priv = file->private_data;
+
+	/* Lock others from changing these values until everything is updated
+	 * in one pass.
+	 */
+	mutex_lock(&priv->parent->tracking);
+
+	priv->parent->readers -= priv->read;
+
+	for (i = 0; i < P2A_REGION_COUNT; i++) {
+		priv->parent->readerwriters[i] -= priv->readwrite[i];
+
+		if (priv->parent->readerwriters[i] > 0)
+			open_regions = true;
+		else
+			bits |= priv->parent->config->regions[i].bit;
+	}
+
+	/* Setting a bit to 1 disables the region, so let's just OR with the
+	 * above to disable any.
+	 */
+
+	/* Note, if another user is trying to ioctl, they can't grab tracking,
+	 * and therefore can't grab either register mutex.
+	 * If another user is trying to close, they can't grab tracking either.
+	 */
+	regmap_update_bits(priv->parent->regmap, SCU2C, bits, bits);
+
+	/* If parent->readers is zero and open windows is 0, disable the
+	 * bridge.
+	 */
+	if (!open_regions && priv->parent->readers == 0)
+		aspeed_p2a_disable_bridge(priv->parent);
+
+	mutex_unlock(&priv->parent->tracking);
+
+	kfree(priv);
+
+	return 0;
+}
+
+static const struct file_operations aspeed_p2a_ctrl_fops = {
+	.owner = THIS_MODULE,
+	.mmap = aspeed_p2a_mmap,
+	.unlocked_ioctl = aspeed_p2a_ioctl,
+	.open = aspeed_p2a_open,
+	.release = aspeed_p2a_release,
+};
+
+/* The regions are controlled by SCU2C */
+static void aspeed_p2a_disable_all(struct aspeed_p2a_ctrl *p2a_ctrl)
+{
+	int i;
+	u32 value = 0;
+
+	for (i = 0; i < P2A_REGION_COUNT; i++)
+		value |= p2a_ctrl->config->regions[i].bit;
+
+	regmap_update_bits(p2a_ctrl->regmap, SCU2C, value, value);
+
+	/* Disable the bridge. */
+	aspeed_p2a_disable_bridge(p2a_ctrl);
+}
+
+static int aspeed_p2a_ctrl_probe(struct platform_device *pdev)
+{
+	struct aspeed_p2a_ctrl *misc_ctrl;
+	struct device *dev;
+	struct resource *res, resm;
+	struct device_node *node;
+	int rc = 0;
+
+	dev = &pdev->dev;
+
+	misc_ctrl = devm_kzalloc(dev, sizeof(*misc_ctrl), GFP_KERNEL);
+	if (!misc_ctrl)
+		return -ENOMEM;
+
+	mutex_init(&misc_ctrl->tracking);
+
+	/* optional. */
+	node = of_parse_phandle(dev->of_node, "memory-region", 0);
+	if (node) {
+		rc = of_address_to_resource(node, 0, &resm);
+		of_node_put(node);
+		if (rc) {
+			dev_err(dev, "Couldn't address to resource for reserved memory\n");
+			return -ENODEV;
+		}
+
+		misc_ctrl->mem_size = resource_size(&resm);
+		misc_ctrl->mem_base = resm.start;
+	}
+
+	misc_ctrl->regmap = syscon_node_to_regmap(pdev->dev.parent->of_node);
+	if (IS_ERR(misc_ctrl->regmap)) {
+		dev_err(dev, "Couldn't get regmap\n");
+		return -ENODEV;
+	}
+
+	misc_ctrl->config = of_device_get_match_data(dev);
+
+	dev_set_drvdata(&pdev->dev, misc_ctrl);
+
+	aspeed_p2a_disable_all(misc_ctrl);
+
+	misc_ctrl->miscdev.minor = MISC_DYNAMIC_MINOR;
+	misc_ctrl->miscdev.name = DEVICE_NAME;
+	misc_ctrl->miscdev.fops = &aspeed_p2a_ctrl_fops;
+	misc_ctrl->miscdev.parent = dev;
+
+	rc = misc_register(&misc_ctrl->miscdev);
+	if (rc)
+		dev_err(dev, "Unable to register device\n");
+
+	return rc;
+}
+
+static int aspeed_p2a_ctrl_remove(struct platform_device *pdev)
+{
+	struct aspeed_p2a_ctrl *p2a_ctrl = dev_get_drvdata(&pdev->dev);
+
+	misc_deregister(&p2a_ctrl->miscdev);
+
+	return 0;
+}
+
+#define SCU2C_DRAM	BIT(25)
+#define SCU2C_SPI	BIT(24)
+#define SCU2C_SOC	BIT(23)
+#define SCU2C_FLASH	BIT(22)
+
+static const struct aspeed_p2a_model_data ast2400_model_data = {
+	.regions = {
+		{0x00000000, 0x17FFFFFF, SCU2C_FLASH},
+		{0x18000000, 0x1FFFFFFF, SCU2C_SOC},
+		{0x20000000, 0x2FFFFFFF, SCU2C_FLASH},
+		{0x30000000, 0x3FFFFFFF, SCU2C_SPI},
+		{0x40000000, 0x5FFFFFFF, SCU2C_DRAM},
+		{0x60000000, 0xFFFFFFFF, SCU2C_SOC},
+	}
+};
+
+static const struct aspeed_p2a_model_data ast2500_model_data = {
+	.regions = {
+		{0x00000000, 0x0FFFFFFF, SCU2C_FLASH},
+		{0x10000000, 0x1FFFFFFF, SCU2C_SOC},
+		{0x20000000, 0x3FFFFFFF, SCU2C_FLASH},
+		{0x40000000, 0x5FFFFFFF, SCU2C_SOC},
+		{0x60000000, 0x7FFFFFFF, SCU2C_SPI},
+		{0x80000000, 0xFFFFFFFF, SCU2C_DRAM},
+	}
+};
+
+static const struct of_device_id aspeed_p2a_ctrl_match[] = {
+	{ .compatible = "aspeed,ast2400-p2a-ctrl",
+	  .data = &ast2400_model_data },
+	{ .compatible = "aspeed,ast2500-p2a-ctrl",
+	  .data = &ast2500_model_data },
+	{ },
+};
+
+static struct platform_driver aspeed_p2a_ctrl_driver = {
+	.driver = {
+		.name		= DEVICE_NAME,
+		.of_match_table = aspeed_p2a_ctrl_match,
+	},
+	.probe = aspeed_p2a_ctrl_probe,
+	.remove = aspeed_p2a_ctrl_remove,
+};
+
+module_platform_driver(aspeed_p2a_ctrl_driver);
+
+MODULE_DEVICE_TABLE(of, aspeed_p2a_ctrl_match);
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Patrick Venture <venture@google.com>");
+MODULE_DESCRIPTION("Control for aspeed 2400/2500 P2A VGA HOST to BMC mappings");
diff --git a/include/uapi/linux/aspeed-p2a-ctrl.h b/include/uapi/linux/aspeed-p2a-ctrl.h
new file mode 100644
index 0000000000000..033355552a6e3
--- /dev/null
+++ b/include/uapi/linux/aspeed-p2a-ctrl.h
@@ -0,0 +1,62 @@
+/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
+/*
+ * Copyright 2019 Google Inc
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * Provides a simple driver to control the ASPEED P2A interface which allows
+ * the host to read and write to various regions of the BMC's memory.
+ */
+
+#ifndef _UAPI_LINUX_ASPEED_P2A_CTRL_H
+#define _UAPI_LINUX_ASPEED_P2A_CTRL_H
+
+#include <linux/ioctl.h>
+#include <linux/types.h>
+
+#define ASPEED_P2A_CTRL_READ_ONLY 0
+#define ASPEED_P2A_CTRL_READWRITE 1
+
+/*
+ * This driver provides a mechanism for enabling or disabling the read-write
+ * property of specific windows into the ASPEED BMC's memory.
+ *
+ * A user can map a region of the BMC's memory as read-only or read-write, with
+ * the caveat that once any region is mapped, all regions are unlocked for
+ * reading.
+ */
+
+/*
+ * Unlock a region of BMC physical memory for access from the host.
+ *
+ * Also used to read back the optional memory-region configuration for the
+ * driver.
+ */
+struct aspeed_p2a_ctrl_mapping {
+	__u64 addr;
+	__u32 length;
+	__u32 flags;
+};
+
+#define __ASPEED_P2A_CTRL_IOCTL_MAGIC 0xb3
+
+/*
+ * This IOCTL is meant to configure a region or regions of memory given a
+ * starting address and length to be readable by the host, or
+ * readable-writeable.
+ */
+#define ASPEED_P2A_CTRL_IOCTL_SET_WINDOW _IOW(__ASPEED_P2A_CTRL_IOCTL_MAGIC, \
+		0x00, struct aspeed_p2a_ctrl_mapping)
+
+/*
+ * This IOCTL is meant to read back to the user the base address and length of
+ * the memory-region specified to the driver for use with mmap.
+ */
+#define ASPEED_P2A_CTRL_IOCTL_GET_MEMORY_CONFIG \
+	_IOWR(__ASPEED_P2A_CTRL_IOCTL_MAGIC, \
+		0x01, struct aspeed_p2a_ctrl_mapping)
+
+#endif /* _UAPI_LINUX_ASPEED_P2A_CTRL_H */
-- 
2.21.0.392.gf8f6787159e-goog


^ permalink raw reply related

* [PATCH v10 1/2] dt-bindings: misc: aspeed-p2a-ctrl: add support
From: Andrew Jeffery @ 2019-04-09  0:48 UTC (permalink / raw)
  To: linux-aspeed
In-Reply-To: <20190408144216.160082-1-venture@google.com>



On Tue, 9 Apr 2019, at 00:12, Patrick Venture wrote:
> Document the ast2400, ast2500 PCI-to-AHB bridge control driver bindings.
> 
> Signed-off-by: Patrick Venture <venture@google.com>
> Reviewed-by: Rob Herring <robh@kernel.org>

Reviewed-by: Andrew Jeffery <andrew@aj.id.au>

> ---
> Changes for v10:
>  - Chopped out nearly identical information.
> Changes for v9:
>  - Added missing details about syscon parent
> Changes for v8:
> - None
> Changes for v7:
> - Moved node under the syscon node it requires
> Changes for v6:
> - None
> Changes for v5:
> - None
> Changes for v4:
> - None
> Changes for v3:
> - None
> Changes for v2:
> - Added comment about syscon required parameter.
> ---
>  .../bindings/misc/aspeed-p2a-ctrl.txt         | 47 +++++++++++++++++++
>  1 file changed, 47 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
> 
> diff --git a/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt 
> b/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
> new file mode 100644
> index 0000000000000..854bd67ffec68
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/aspeed-p2a-ctrl.txt
> @@ -0,0 +1,47 @@
> +======================================================================
> +Device tree bindings for Aspeed AST2400/AST2500 PCI-to-AHB Bridge 
> Control Driver
> +======================================================================
> +
> +The bridge is available on platforms with the VGA enabled on the 
> Aspeed device.
> +In this case, the host has access to a 64KiB window into all of the 
> BMC's
> +memory.  The BMC can disable this bridge.  If the bridge is enabled, 
> the host
> +has read access to all the regions of memory, however the host only 
> has read
> +and write access depending on a register controlled by the BMC.
> +
> +Required properties:
> +===================
> +
> + - compatible: must be one of:
> +	- "aspeed,ast2400-p2a-ctrl"
> +	- "aspeed,ast2500-p2a-ctrl"
> +
> +Optional properties:
> +===================
> +
> +- memory-region: A phandle to a reserved_memory region to be used for 
> the PCI
> +		to AHB mapping
> +
> +The p2a-control node should be the child of a syscon node with the 
> required
> +property:
> +
> +- compatible : Should be one of the following:
> +		"aspeed,ast2400-scu", "syscon", "simple-mfd"
> +		"aspeed,g4-scu", "syscon", "simple-mfd"
> +		"aspeed,ast2500-scu", "syscon", "simple-mfd"
> +		"aspeed,g5-scu", "syscon", "simple-mfd"
> +
> +Example
> +===================
> +
> +g4 Example
> +----------
> +
> +syscon: scu at 1e6e2000 {
> +	compatible = "aspeed,ast2400-scu", "syscon", "simple-mfd";
> +	reg = <0x1e6e2000 0x1a8>;
> +
> +	p2a: p2a-control {
> +		compatible = "aspeed,ast2400-p2a-ctrl";
> +		memory-region = <&reserved_memory>;
> +	};
> +};
> -- 
> 2.21.0.392.gf8f6787159e-goog
> 
>

^ permalink raw reply

* [PATCH 00/21] Convert hwmon documentation to ReST
From: Mauro Carvalho Chehab @ 2019-04-10 11:11 UTC (permalink / raw)
  To: linux-aspeed

This series converts the contents of Documentation/hwmon to ReST
format.

PS.: I opted to group the conversion files per groups of maintainer
set, as, if I were to generate one patch per file, it would give around
160 patches.

I also added those patches to my development tree at:
	https://git.linuxtv.org/mchehab/experimental.git/log/?h=hwmon

If you want to see the results, they're at:
	https://www.infradead.org/~mchehab/hwmon/

Mauro Carvalho Chehab (21):
  docs: hwmon: k10temp: convert to ReST format
  docs: hwmon: vexpress: convert to ReST format
  docs: hwmon: menf21bmc: convert to ReST format
  docs: hwmon: sch5627: convert to ReST format
  docs: hwmon: emc2103: convert to ReST format
  docs: hwmon: pc87360: convert to ReST format
  docs: hwmon: fam15h_power: convert to ReST format
  docs: hwmon: w83791d: convert to ReST format
  docs: hwmon: coretemp: convert to ReST format
  docs: hwmon: aspeed-pwm-tacho: convert to ReST format
  docs: hwmon: ibmpowernv: convert to ReST format
  docs: hwmon: asc7621: convert to ReST format
  docs: hwmon: ads1015: convert to ReST format
  docs: hwmon: dme1737, vt1211: convert to ReST format
  docs: hwmon: wm831x, wm8350: convert to ReST format
  docs: hwmon: da9052, da9055: convert to ReST format
  docs: hwmon: k8temp, w83793: convert to ReST format
  docs: hwmon: pmbus files: convert to ReST format
  docs: hwmon: misc files: convert to ReST format
  docs: hwmon: convert remaining files to ReST format
  docs: hwmon: Add an index file and rename docs to *.rst

 .../devicetree/bindings/hwmon/g762.txt        |   2 +-
 Documentation/hwmon/{ab8500 => ab8500.rst}    |  10 +-
 Documentation/hwmon/abituguru                 |  92 ---
 ...guru-datasheet => abituguru-datasheet.rst} | 160 ++--
 Documentation/hwmon/abituguru.rst             | 113 +++
 .../hwmon/{abituguru3 => abituguru3.rst}      |  36 +-
 Documentation/hwmon/{abx500 => abx500.rst}    |   8 +-
 ...{acpi_power_meter => acpi_power_meter.rst} |  25 +-
 Documentation/hwmon/{ad7314 => ad7314.rst}    |   9 +
 .../hwmon/{adc128d818 => adc128d818.rst}      |   7 +-
 Documentation/hwmon/{adm1021 => adm1021.rst}  |  44 +-
 Documentation/hwmon/{adm1025 => adm1025.rst}  |  13 +-
 Documentation/hwmon/{adm1026 => adm1026.rst}  |  24 +-
 Documentation/hwmon/{adm1031 => adm1031.rst}  |  16 +-
 Documentation/hwmon/{adm1275 => adm1275.rst}  |  30 +-
 Documentation/hwmon/{adm9240 => adm9240.rst}  |  50 +-
 Documentation/hwmon/{ads1015 => ads1015.rst}  |  72 +-
 Documentation/hwmon/{ads7828 => ads7828.rst}  |  29 +-
 Documentation/hwmon/{adt7410 => adt7410.rst}  |  49 +-
 Documentation/hwmon/{adt7411 => adt7411.rst}  |  20 +-
 Documentation/hwmon/{adt7462 => adt7462.rst}  |  10 +-
 Documentation/hwmon/{adt7470 => adt7470.rst}  |   8 +-
 Documentation/hwmon/{adt7475 => adt7475.rst}  |  38 +-
 Documentation/hwmon/{amc6821 => amc6821.rst}  |  19 +-
 Documentation/hwmon/{asb100 => asb100.rst}    |  50 +-
 Documentation/hwmon/{asc7621 => asc7621.rst}  | 146 ++--
 ...{aspeed-pwm-tacho => aspeed-pwm-tacho.rst} |   2 +
 .../hwmon/{coretemp => coretemp.rst}          |  46 +-
 Documentation/hwmon/{da9052 => da9052.rst}    |  40 +-
 Documentation/hwmon/{da9055 => da9055.rst}    |  20 +-
 Documentation/hwmon/{dme1737 => dme1737.rst}  |  88 ++-
 Documentation/hwmon/{ds1621 => ds1621.rst}    | 154 ++--
 Documentation/hwmon/{ds620 => ds620.rst}      |  12 +-
 Documentation/hwmon/{emc1403 => emc1403.rst}  |  33 +-
 Documentation/hwmon/{emc2103 => emc2103.rst}  |   6 +-
 .../hwmon/{emc6w201 => emc6w201.rst}          |   5 +
 Documentation/hwmon/{f71805f => f71805f.rst}  |  36 +-
 .../hwmon/{f71882fg => f71882fg.rst}          |  56 +-
 .../hwmon/{fam15h_power => fam15h_power.rst}  |  85 ++-
 .../hwmon/{ftsteutates => ftsteutates.rst}    |  14 +-
 Documentation/hwmon/{g760a => g760a.rst}      |   4 +
 Documentation/hwmon/{g762 => g762.rst}        |  67 +-
 Documentation/hwmon/{gl518sm => gl518sm.rst}  |  21 +-
 Documentation/hwmon/{hih6130 => hih6130.rst}  |  14 +-
 ...on-kernel-api.txt => hwmon-kernel-api.rst} | 298 ++++----
 .../hwmon/{ibm-cffps => ibm-cffps.rst}        |   3 +
 Documentation/hwmon/{ibmaem => ibmaem.rst}    |  10 +-
 .../hwmon/{ibmpowernv => ibmpowernv.rst}      |   3 +
 Documentation/hwmon/{ina209 => ina209.rst}    |  18 +-
 Documentation/hwmon/{ina2xx => ina2xx.rst}    |  41 +-
 Documentation/hwmon/{ina3221 => ina3221.rst}  |  17 +-
 Documentation/hwmon/index.rst                 | 179 +++++
 Documentation/hwmon/{ir35221 => ir35221.rst}  |  12 +-
 Documentation/hwmon/{it87 => it87.rst}        | 102 ++-
 Documentation/hwmon/{jc42 => jc42.rst}        |  55 +-
 Documentation/hwmon/{k10temp => k10temp.rst}  |  37 +-
 Documentation/hwmon/{k8temp => k8temp.rst}    |  17 +-
 .../hwmon/{lineage-pem => lineage-pem.rst}    |  16 +-
 Documentation/hwmon/{lm25066 => lm25066.rst}  |  32 +-
 Documentation/hwmon/{lm63 => lm63.rst}        |  24 +-
 Documentation/hwmon/{lm70 => lm70.rst}        |  13 +-
 Documentation/hwmon/{lm73 => lm73.rst}        |  16 +-
 Documentation/hwmon/{lm75 => lm75.rst}        |  96 ++-
 Documentation/hwmon/{lm77 => lm77.rst}        |   9 +-
 Documentation/hwmon/{lm78 => lm78.rst}        |  20 +-
 Documentation/hwmon/{lm80 => lm80.rst}        |  19 +-
 Documentation/hwmon/{lm83 => lm83.rst}        |  16 +-
 Documentation/hwmon/{lm85 => lm85.rst}        |  97 ++-
 Documentation/hwmon/{lm87 => lm87.rst}        |  23 +-
 Documentation/hwmon/{lm90 => lm90.rst}        | 174 ++++-
 Documentation/hwmon/{lm92 => lm92.rst}        |  17 +-
 Documentation/hwmon/{lm93 => lm93.rst}        | 157 ++--
 Documentation/hwmon/{lm95234 => lm95234.rst}  |  11 +-
 Documentation/hwmon/{lm95245 => lm95245.rst}  |  13 +-
 Documentation/hwmon/{ltc2945 => ltc2945.rst}  |  16 +-
 Documentation/hwmon/{ltc2978 => ltc2978.rst}  | 267 +++++--
 Documentation/hwmon/{ltc2990 => ltc2990.rst}  |  23 +-
 Documentation/hwmon/{ltc3815 => ltc3815.rst}  |  12 +-
 Documentation/hwmon/{ltc4151 => ltc4151.rst}  |  16 +-
 Documentation/hwmon/{ltc4215 => ltc4215.rst}  |  16 +-
 Documentation/hwmon/{ltc4245 => ltc4245.rst}  |  17 +-
 Documentation/hwmon/{ltc4260 => ltc4260.rst}  |  16 +-
 Documentation/hwmon/{ltc4261 => ltc4261.rst}  |  16 +-
 .../hwmon/{max16064 => max16064.rst}          |  17 +-
 .../hwmon/{max16065 => max16065.rst}          |  24 +-
 Documentation/hwmon/{max1619 => max1619.rst}  |  11 +-
 Documentation/hwmon/{max1668 => max1668.rst}  |  14 +-
 Documentation/hwmon/{max197 => max197.rst}    |  36 +-
 .../hwmon/{max20751 => max20751.rst}          |   9 +-
 .../hwmon/{max31722 => max31722.rst}          |  12 +
 .../hwmon/{max31785 => max31785.rst}          |   6 +
 .../hwmon/{max31790 => max31790.rst}          |   6 +
 .../hwmon/{max34440 => max34440.rst}          |  90 ++-
 Documentation/hwmon/{max6639 => max6639.rst}  |  16 +-
 Documentation/hwmon/{max6642 => max6642.rst}  |  10 +-
 Documentation/hwmon/{max6650 => max6650.rst}  |  16 +-
 Documentation/hwmon/{max6697 => max6697.rst}  |  33 +
 Documentation/hwmon/{max8688 => max8688.rst}  |  20 +-
 .../hwmon/{mc13783-adc => mc13783-adc.rst}    |  27 +-
 Documentation/hwmon/{mcp3021 => mcp3021.rst}  |  15 +-
 .../hwmon/{menf21bmc => menf21bmc.rst}        |   5 +
 .../hwmon/{mlxreg-fan => mlxreg-fan.rst}      |  60 +-
 Documentation/hwmon/{nct6683 => nct6683.rst}  |  11 +-
 Documentation/hwmon/{nct6775 => nct6775.rst}  | 114 ++-
 Documentation/hwmon/{nct7802 => nct7802.rst}  |  11 +-
 Documentation/hwmon/{nct7904 => nct7904.rst}  |   9 +-
 .../{npcm750-pwm-fan => npcm750-pwm-fan.rst}  |   4 +
 Documentation/hwmon/{nsa320 => nsa320.rst}    |  15 +-
 .../{ntc_thermistor => ntc_thermistor.rst}    | 123 ++--
 Documentation/hwmon/{occ => occ.rst}          |  93 ++-
 Documentation/hwmon/{pc87360 => pc87360.rst}  |  38 +-
 Documentation/hwmon/{pc87427 => pc87427.rst}  |   4 +
 Documentation/hwmon/{pcf8591 => pcf8591.rst}  |  52 +-
 .../hwmon/{pmbus-core => pmbus-core.rst}      | 173 +++--
 Documentation/hwmon/{pmbus => pmbus.rst}      |  90 ++-
 .../hwmon/{powr1220 => powr1220.rst}          |  12 +-
 Documentation/hwmon/{pwm-fan => pwm-fan.rst}  |   0
 ...aspberrypi-hwmon => raspberrypi-hwmon.rst} |   3 +
 Documentation/hwmon/{sch5627 => sch5627.rst}  |   4 +
 Documentation/hwmon/{sch5636 => sch5636.rst}  |   3 +
 .../hwmon/{scpi-hwmon => scpi-hwmon.rst}      |   7 +-
 Documentation/hwmon/{sht15 => sht15.rst}      |  28 +-
 Documentation/hwmon/{sht21 => sht21.rst}      |  24 +-
 Documentation/hwmon/{sht3x => sht3x.rst}      |  42 +-
 Documentation/hwmon/{shtc1 => shtc1.rst}      |  19 +-
 Documentation/hwmon/{sis5595 => sis5595.rst}  |  40 +-
 Documentation/hwmon/{smm665 => smm665.rst}    |  42 +-
 .../hwmon/{smsc47b397 => smsc47b397.rst}      | 158 ++--
 .../hwmon/{smsc47m1 => smsc47m1.rst}          |  43 +-
 Documentation/hwmon/smsc47m192                | 103 ---
 Documentation/hwmon/smsc47m192.rst            | 116 +++
 ...mitting-patches => submitting-patches.rst} |  17 +-
 .../{sysfs-interface => sysfs-interface.rst}  | 696 ++++++++++++------
 Documentation/hwmon/{tc654 => tc654.rst}      |   9 +-
 Documentation/hwmon/{tc74 => tc74.rst}        |   3 +
 Documentation/hwmon/{thmc50 => thmc50.rst}    |  36 +-
 Documentation/hwmon/{tmp102 => tmp102.rst}    |   7 +-
 Documentation/hwmon/{tmp103 => tmp103.rst}    |   7 +-
 Documentation/hwmon/{tmp108 => tmp108.rst}    |   7 +-
 Documentation/hwmon/{tmp401 => tmp401.rst}    |  32 +-
 Documentation/hwmon/{tmp421 => tmp421.rst}    |  26 +-
 .../hwmon/{tps40422 => tps40422.rst}          |  25 +-
 ...4030-madc-hwmon => twl4030-madc-hwmon.rst} |   8 +-
 Documentation/hwmon/{ucd9000 => ucd9000.rst}  |  35 +-
 Documentation/hwmon/{ucd9200 => ucd9200.rst}  |  46 +-
 .../{userspace-tools => userspace-tools.rst}  |   3 +
 .../hwmon/{vexpress => vexpress.rst}          |  13 +-
 Documentation/hwmon/{via686a => via686a.rst}  |  30 +-
 Documentation/hwmon/{vt1211 => vt1211.rst}    |  84 ++-
 .../hwmon/{w83627ehf => w83627ehf.rst}        | 160 ++--
 .../hwmon/{w83627hf => w83627hf.rst}          |  65 +-
 Documentation/hwmon/{w83773g => w83773g.rst}  |  12 +-
 Documentation/hwmon/{w83781d => w83781d.rst}  | 330 +++++----
 Documentation/hwmon/{w83791d => w83791d.rst}  | 123 ++--
 Documentation/hwmon/{w83792d => w83792d.rst}  | 112 +--
 Documentation/hwmon/w83793                    | 106 ---
 Documentation/hwmon/w83793.rst                | 113 +++
 Documentation/hwmon/w83795                    | 127 ----
 Documentation/hwmon/w83795.rst                | 142 ++++
 .../hwmon/{w83l785ts => w83l785ts.rst}        |   9 +-
 .../hwmon/{w83l786ng => w83l786ng.rst}        |  42 +-
 Documentation/hwmon/{wm831x => wm831x.rst}    |   9 +-
 Documentation/hwmon/{wm8350 => wm8350.rst}    |  10 +-
 .../hwmon/{xgene-hwmon => xgene-hwmon.rst}    |  24 +-
 Documentation/hwmon/{zl6100 => zl6100.rst}    |  71 +-
 Documentation/index.rst                       |   1 +
 Documentation/thermal/sysfs-api.txt           |   2 +-
 MAINTAINERS                                   | 108 +--
 drivers/hwmon/Kconfig                         |   8 +-
 drivers/hwmon/ads7828.c                       |   2 +-
 drivers/hwmon/max197.c                        |   2 +-
 drivers/hwmon/sht15.c                         |   2 +-
 include/linux/platform_data/ads7828.h         |   2 +-
 include/linux/platform_data/ds620.h           |   2 +-
 include/linux/platform_data/ina2xx.h          |   2 +-
 include/linux/platform_data/max197.h          |   2 +-
 include/linux/platform_data/ntc_thermistor.h  |   2 +-
 177 files changed, 5602 insertions(+), 2607 deletions(-)
 rename Documentation/hwmon/{ab8500 => ab8500.rst} (69%)
 delete mode 100644 Documentation/hwmon/abituguru
 rename Documentation/hwmon/{abituguru-datasheet => abituguru-datasheet.rst} (69%)
 create mode 100644 Documentation/hwmon/abituguru.rst
 rename Documentation/hwmon/{abituguru3 => abituguru3.rst} (75%)
 rename Documentation/hwmon/{abx500 => abx500.rst} (89%)
 rename Documentation/hwmon/{acpi_power_meter => acpi_power_meter.rst} (65%)
 rename Documentation/hwmon/{ad7314 => ad7314.rst} (98%)
 rename Documentation/hwmon/{adc128d818 => adc128d818.rst} (95%)
 rename Documentation/hwmon/{adm1021 => adm1021.rst} (97%)
 rename Documentation/hwmon/{adm1025 => adm1025.rst} (96%)
 rename Documentation/hwmon/{adm1026 => adm1026.rst} (89%)
 rename Documentation/hwmon/{adm1031 => adm1031.rst} (80%)
 rename Documentation/hwmon/{adm1275 => adm1275.rst} (93%)
 rename Documentation/hwmon/{adm9240 => adm9240.rst} (85%)
 rename Documentation/hwmon/{ads1015 => ads1015.rst} (64%)
 rename Documentation/hwmon/{ads7828 => ads7828.rst} (68%)
 rename Documentation/hwmon/{adt7410 => adt7410.rst} (70%)
 rename Documentation/hwmon/{adt7411 => adt7411.rst} (67%)
 rename Documentation/hwmon/{adt7462 => adt7462.rst} (94%)
 rename Documentation/hwmon/{adt7470 => adt7470.rst} (95%)
 rename Documentation/hwmon/{adt7475 => adt7475.rst} (89%)
 rename Documentation/hwmon/{amc6821 => amc6821.rst} (90%)
 rename Documentation/hwmon/{asb100 => asb100.rst} (69%)
 rename Documentation/hwmon/{asc7621 => asc7621.rst} (80%)
 rename Documentation/hwmon/{aspeed-pwm-tacho => aspeed-pwm-tacho.rst} (79%)
 rename Documentation/hwmon/{coretemp => coretemp.rst} (78%)
 rename Documentation/hwmon/{da9052 => da9052.rst} (66%)
 rename Documentation/hwmon/{da9055 => da9055.rst} (80%)
 rename Documentation/hwmon/{dme1737 => dme1737.rst} (89%)
 rename Documentation/hwmon/{ds1621 => ds1621.rst} (68%)
 rename Documentation/hwmon/{ds620 => ds620.rst} (88%)
 rename Documentation/hwmon/{emc1403 => emc1403.rst} (83%)
 rename Documentation/hwmon/{emc2103 => emc2103.rst} (95%)
 rename Documentation/hwmon/{emc6w201 => emc6w201.rst} (99%)
 rename Documentation/hwmon/{f71805f => f71805f.rst} (88%)
 rename Documentation/hwmon/{f71882fg => f71882fg.rst} (97%)
 rename Documentation/hwmon/{fam15h_power => fam15h_power.rst} (63%)
 rename Documentation/hwmon/{ftsteutates => ftsteutates.rst} (65%)
 rename Documentation/hwmon/{g760a => g760a.rst} (99%)
 rename Documentation/hwmon/{g762 => g762.rst} (59%)
 rename Documentation/hwmon/{gl518sm => gl518sm.rst} (89%)
 rename Documentation/hwmon/{hih6130 => hih6130.rst} (85%)
 rename Documentation/hwmon/{hwmon-kernel-api.txt => hwmon-kernel-api.rst} (59%)
 rename Documentation/hwmon/{ibm-cffps => ibm-cffps.rst} (90%)
 rename Documentation/hwmon/{ibmaem => ibmaem.rst} (92%)
 rename Documentation/hwmon/{ibmpowernv => ibmpowernv.rst} (94%)
 rename Documentation/hwmon/{ina209 => ina209.rst} (90%)
 rename Documentation/hwmon/{ina2xx => ina2xx.rst} (81%)
 rename Documentation/hwmon/{ina3221 => ina3221.rst} (77%)
 create mode 100644 Documentation/hwmon/index.rst
 rename Documentation/hwmon/{ir35221 => ir35221.rst} (89%)
 rename Documentation/hwmon/{it87 => it87.rst} (92%)
 rename Documentation/hwmon/{jc42 => jc42.rst} (92%)
 rename Documentation/hwmon/{k10temp => k10temp.rst} (98%)
 rename Documentation/hwmon/{k8temp => k8temp.rst} (83%)
 rename Documentation/hwmon/{lineage-pem => lineage-pem.rst} (88%)
 rename Documentation/hwmon/{lm25066 => lm25066.rst} (91%)
 rename Documentation/hwmon/{lm63 => lm63.rst} (95%)
 rename Documentation/hwmon/{lm70 => lm70.rst} (96%)
 rename Documentation/hwmon/{lm73 => lm73.rst} (92%)
 rename Documentation/hwmon/{lm75 => lm75.rst} (80%)
 rename Documentation/hwmon/{lm77 => lm77.rst} (97%)
 rename Documentation/hwmon/{lm78 => lm78.rst} (95%)
 rename Documentation/hwmon/{lm80 => lm80.rst} (94%)
 rename Documentation/hwmon/{lm83 => lm83.rst} (95%)
 rename Documentation/hwmon/{lm85 => lm85.rst} (86%)
 rename Documentation/hwmon/{lm87 => lm87.rst} (89%)
 rename Documentation/hwmon/{lm90 => lm90.rst} (85%)
 rename Documentation/hwmon/{lm92 => lm92.rst} (90%)
 rename Documentation/hwmon/{lm93 => lm93.rst} (80%)
 rename Documentation/hwmon/{lm95234 => lm95234.rst} (94%)
 rename Documentation/hwmon/{lm95245 => lm95245.rst} (91%)
 rename Documentation/hwmon/{ltc2945 => ltc2945.rst} (89%)
 rename Documentation/hwmon/{ltc2978 => ltc2978.rst} (58%)
 rename Documentation/hwmon/{ltc2990 => ltc2990.rst} (76%)
 rename Documentation/hwmon/{ltc3815 => ltc3815.rst} (83%)
 rename Documentation/hwmon/{ltc4151 => ltc4151.rst} (80%)
 rename Documentation/hwmon/{ltc4215 => ltc4215.rst} (78%)
 rename Documentation/hwmon/{ltc4245 => ltc4245.rst} (89%)
 rename Documentation/hwmon/{ltc4260 => ltc4260.rst} (85%)
 rename Documentation/hwmon/{ltc4261 => ltc4261.rst} (88%)
 rename Documentation/hwmon/{max16064 => max16064.rst} (88%)
 rename Documentation/hwmon/{max16065 => max16065.rst} (95%)
 rename Documentation/hwmon/{max1619 => max1619.rst} (82%)
 rename Documentation/hwmon/{max1668 => max1668.rst} (85%)
 rename Documentation/hwmon/{max197 => max197.rst} (59%)
 rename Documentation/hwmon/{max20751 => max20751.rst} (89%)
 rename Documentation/hwmon/{max31722 => max31722.rst} (83%)
 rename Documentation/hwmon/{max31785 => max31785.rst} (92%)
 rename Documentation/hwmon/{max31790 => max31790.rst} (88%)
 rename Documentation/hwmon/{max34440 => max34440.rst} (77%)
 rename Documentation/hwmon/{max6639 => max6639.rst} (83%)
 rename Documentation/hwmon/{max6642 => max6642.rst} (82%)
 rename Documentation/hwmon/{max6650 => max6650.rst} (86%)
 rename Documentation/hwmon/{max6697 => max6697.rst} (91%)
 rename Documentation/hwmon/{max8688 => max8688.rst} (85%)
 rename Documentation/hwmon/{mc13783-adc => mc13783-adc.rst} (82%)
 rename Documentation/hwmon/{mcp3021 => mcp3021.rst} (90%)
 rename Documentation/hwmon/{menf21bmc => menf21bmc.rst} (93%)
 rename Documentation/hwmon/{mlxreg-fan => mlxreg-fan.rst} (53%)
 rename Documentation/hwmon/{nct6683 => nct6683.rst} (89%)
 rename Documentation/hwmon/{nct6775 => nct6775.rst} (86%)
 rename Documentation/hwmon/{nct7802 => nct7802.rst} (73%)
 rename Documentation/hwmon/{nct7904 => nct7904.rst} (88%)
 rename Documentation/hwmon/{npcm750-pwm-fan => npcm750-pwm-fan.rst} (79%)
 rename Documentation/hwmon/{nsa320 => nsa320.rst} (93%)
 rename Documentation/hwmon/{ntc_thermistor => ntc_thermistor.rst} (52%)
 rename Documentation/hwmon/{occ => occ.rst} (67%)
 rename Documentation/hwmon/{pc87360 => pc87360.rst} (88%)
 rename Documentation/hwmon/{pc87427 => pc87427.rst} (99%)
 rename Documentation/hwmon/{pcf8591 => pcf8591.rst} (62%)
 rename Documentation/hwmon/{pmbus-core => pmbus-core.rst} (68%)
 rename Documentation/hwmon/{pmbus => pmbus.rst} (88%)
 rename Documentation/hwmon/{powr1220 => powr1220.rst} (90%)
 rename Documentation/hwmon/{pwm-fan => pwm-fan.rst} (100%)
 rename Documentation/hwmon/{raspberrypi-hwmon => raspberrypi-hwmon.rst} (85%)
 rename Documentation/hwmon/{sch5627 => sch5627.rst} (99%)
 rename Documentation/hwmon/{sch5636 => sch5636.rst} (99%)
 rename Documentation/hwmon/{scpi-hwmon => scpi-hwmon.rst} (96%)
 rename Documentation/hwmon/{sht15 => sht15.rst} (74%)
 rename Documentation/hwmon/{sht21 => sht21.rst} (92%)
 rename Documentation/hwmon/{sht3x => sht3x.rst} (75%)
 rename Documentation/hwmon/{shtc1 => shtc1.rst} (94%)
 rename Documentation/hwmon/{sis5595 => sis5595.rst} (79%)
 rename Documentation/hwmon/{smm665 => smm665.rst} (92%)
 rename Documentation/hwmon/{smsc47b397 => smsc47b397.rst} (62%)
 rename Documentation/hwmon/{smsc47m1 => smsc47m1.rst} (77%)
 delete mode 100644 Documentation/hwmon/smsc47m192
 create mode 100644 Documentation/hwmon/smsc47m192.rst
 rename Documentation/hwmon/{submitting-patches => submitting-patches.rst} (95%)
 rename Documentation/hwmon/{sysfs-interface => sysfs-interface.rst} (70%)
 rename Documentation/hwmon/{tc654 => tc654.rst} (81%)
 rename Documentation/hwmon/{tc74 => tc74.rst} (99%)
 rename Documentation/hwmon/{thmc50 => thmc50.rst} (84%)
 rename Documentation/hwmon/{tmp102 => tmp102.rst} (92%)
 rename Documentation/hwmon/{tmp103 => tmp103.rst} (91%)
 rename Documentation/hwmon/{tmp108 => tmp108.rst} (95%)
 rename Documentation/hwmon/{tmp401 => tmp401.rst} (92%)
 rename Documentation/hwmon/{tmp421 => tmp421.rst} (96%)
 rename Documentation/hwmon/{tps40422 => tps40422.rst} (75%)
 rename Documentation/hwmon/{twl4030-madc-hwmon => twl4030-madc-hwmon.rst} (82%)
 rename Documentation/hwmon/{ucd9000 => ucd9000.rst} (87%)
 rename Documentation/hwmon/{ucd9200 => ucd9200.rst} (80%)
 rename Documentation/hwmon/{userspace-tools => userspace-tools.rst} (97%)
 rename Documentation/hwmon/{vexpress => vexpress.rst} (85%)
 rename Documentation/hwmon/{via686a => via686a.rst} (79%)
 rename Documentation/hwmon/{vt1211 => vt1211.rst} (73%)
 rename Documentation/hwmon/{w83627ehf => w83627ehf.rst} (64%)
 rename Documentation/hwmon/{w83627hf => w83627hf.rst} (73%)
 rename Documentation/hwmon/{w83773g => w83773g.rst} (91%)
 rename Documentation/hwmon/{w83781d => w83781d.rst} (66%)
 rename Documentation/hwmon/{w83791d => w83791d.rst} (59%)
 rename Documentation/hwmon/{w83792d => w83792d.rst} (78%)
 delete mode 100644 Documentation/hwmon/w83793
 create mode 100644 Documentation/hwmon/w83793.rst
 delete mode 100644 Documentation/hwmon/w83795
 create mode 100644 Documentation/hwmon/w83795.rst
 rename Documentation/hwmon/{w83l785ts => w83l785ts.rst} (91%)
 rename Documentation/hwmon/{w83l786ng => w83l786ng.rst} (64%)
 rename Documentation/hwmon/{wm831x => wm831x.rst} (86%)
 rename Documentation/hwmon/{wm8350 => wm8350.rst} (81%)
 rename Documentation/hwmon/{xgene-hwmon => xgene-hwmon.rst} (51%)
 rename Documentation/hwmon/{zl6100 => zl6100.rst} (83%)

-- 
2.20.1



^ permalink raw reply

* [PATCH 10/21] docs: hwmon: aspeed-pwm-tacho: convert to ReST format
From: Mauro Carvalho Chehab @ 2019-04-10 11:12 UTC (permalink / raw)
  To: linux-aspeed
In-Reply-To: <cover.1554893881.git.mchehab+samsung@kernel.org>

Convert aspeed-pwm-tacho to ReST format, in order to allow it to
be parsed by Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung at kernel.org
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 Documentation/hwmon/aspeed-pwm-tacho | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/hwmon/aspeed-pwm-tacho b/Documentation/hwmon/aspeed-pwm-tacho
index 7cfb34977460..6dcec845fbc7 100644
--- a/Documentation/hwmon/aspeed-pwm-tacho
+++ b/Documentation/hwmon/aspeed-pwm-tacho
@@ -15,8 +15,10 @@ controller supports up to 16 tachometer inputs.
 
 The driver provides the following sensor accesses in sysfs:
 
+=============== ======= =====================================================
 fanX_input	ro	provide current fan rotation value in RPM as reported
 			by the fan to the device.
 
 pwmX		rw	get or set PWM fan control value. This is an integer
 			value between 0(off) and 255(full speed).
+=============== ======= =====================================================
-- 
2.20.1


^ permalink raw reply related

* [PATCH 21/21] docs: hwmon: Add an index file and rename docs to *.rst
From: Mauro Carvalho Chehab @ 2019-04-10 11:12 UTC (permalink / raw)
  To: linux-aspeed
In-Reply-To: <cover.1554893881.git.mchehab+samsung@kernel.org>

Now that all files were converted to ReST format, rename them
and add an index.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 .../devicetree/bindings/hwmon/g762.txt        |   2 +-
 Documentation/hwmon/{ab8500 => ab8500.rst}    |   2 +-
 ...guru-datasheet => abituguru-datasheet.rst} |   0
 .../hwmon/{abituguru => abituguru.rst}        |   0
 .../hwmon/{abituguru3 => abituguru3.rst}      |   0
 Documentation/hwmon/{abx500 => abx500.rst}    |   0
 ...{acpi_power_meter => acpi_power_meter.rst} |   2 +-
 Documentation/hwmon/{ad7314 => ad7314.rst}    |   0
 .../hwmon/{adc128d818 => adc128d818.rst}      |   0
 Documentation/hwmon/{adm1021 => adm1021.rst}  |   0
 Documentation/hwmon/{adm1025 => adm1025.rst}  |   0
 Documentation/hwmon/{adm1026 => adm1026.rst}  |   0
 Documentation/hwmon/{adm1031 => adm1031.rst}  |   0
 Documentation/hwmon/{adm1275 => adm1275.rst}  |   4 +-
 Documentation/hwmon/{adm9240 => adm9240.rst}  |   0
 Documentation/hwmon/{ads1015 => ads1015.rst}  |   0
 Documentation/hwmon/{ads7828 => ads7828.rst}  |   0
 Documentation/hwmon/{adt7410 => adt7410.rst}  |   0
 Documentation/hwmon/{adt7411 => adt7411.rst}  |   0
 Documentation/hwmon/{adt7462 => adt7462.rst}  |   0
 Documentation/hwmon/{adt7470 => adt7470.rst}  |   0
 Documentation/hwmon/{adt7475 => adt7475.rst}  |   0
 Documentation/hwmon/{amc6821 => amc6821.rst}  |   0
 Documentation/hwmon/{asb100 => asb100.rst}    |   0
 Documentation/hwmon/{asc7621 => asc7621.rst}  |   0
 ...{aspeed-pwm-tacho => aspeed-pwm-tacho.rst} |   0
 .../hwmon/{coretemp => coretemp.rst}          |   0
 Documentation/hwmon/{da9052 => da9052.rst}    |   0
 Documentation/hwmon/{da9055 => da9055.rst}    |   0
 Documentation/hwmon/{dme1737 => dme1737.rst}  |   0
 Documentation/hwmon/{ds1621 => ds1621.rst}    |   0
 Documentation/hwmon/{ds620 => ds620.rst}      |   0
 Documentation/hwmon/{emc1403 => emc1403.rst}  |   0
 Documentation/hwmon/{emc2103 => emc2103.rst}  |   0
 .../hwmon/{emc6w201 => emc6w201.rst}          |   0
 Documentation/hwmon/{f71805f => f71805f.rst}  |   0
 .../hwmon/{f71882fg => f71882fg.rst}          |   0
 .../hwmon/{fam15h_power => fam15h_power.rst}  |   0
 .../hwmon/{ftsteutates => ftsteutates.rst}    |   0
 Documentation/hwmon/{g760a => g760a.rst}      |   0
 Documentation/hwmon/{g762 => g762.rst}        |   2 +-
 Documentation/hwmon/{gl518sm => gl518sm.rst}  |   0
 Documentation/hwmon/{hih6130 => hih6130.rst}  |   0
 ...on-kernel-api.txt => hwmon-kernel-api.rst} |   4 +-
 .../hwmon/{ibm-cffps => ibm-cffps.rst}        |   0
 Documentation/hwmon/{ibmaem => ibmaem.rst}    |   0
 .../hwmon/{ibmpowernv => ibmpowernv.rst}      |   0
 Documentation/hwmon/{ina209 => ina209.rst}    |   0
 Documentation/hwmon/{ina2xx => ina2xx.rst}    |   2 +-
 Documentation/hwmon/{ina3221 => ina3221.rst}  |   0
 Documentation/hwmon/index.rst                 | 179 ++++++++++++++++++
 Documentation/hwmon/{ir35221 => ir35221.rst}  |   0
 Documentation/hwmon/{it87 => it87.rst}        |   0
 Documentation/hwmon/{jc42 => jc42.rst}        |   0
 Documentation/hwmon/{k10temp => k10temp.rst}  |   0
 Documentation/hwmon/{k8temp => k8temp.rst}    |   0
 .../hwmon/{lineage-pem => lineage-pem.rst}    |   0
 Documentation/hwmon/{lm25066 => lm25066.rst}  |   2 +-
 Documentation/hwmon/{lm63 => lm63.rst}        |   0
 Documentation/hwmon/{lm70 => lm70.rst}        |   0
 Documentation/hwmon/{lm73 => lm73.rst}        |   0
 Documentation/hwmon/{lm75 => lm75.rst}        |   0
 Documentation/hwmon/{lm77 => lm77.rst}        |   0
 Documentation/hwmon/{lm78 => lm78.rst}        |   0
 Documentation/hwmon/{lm80 => lm80.rst}        |   0
 Documentation/hwmon/{lm83 => lm83.rst}        |   0
 Documentation/hwmon/{lm85 => lm85.rst}        |   0
 Documentation/hwmon/{lm87 => lm87.rst}        |   0
 Documentation/hwmon/{lm90 => lm90.rst}        |   0
 Documentation/hwmon/{lm92 => lm92.rst}        |   0
 Documentation/hwmon/{lm93 => lm93.rst}        |   0
 Documentation/hwmon/{lm95234 => lm95234.rst}  |   0
 Documentation/hwmon/{lm95245 => lm95245.rst}  |   0
 Documentation/hwmon/{ltc2945 => ltc2945.rst}  |   0
 Documentation/hwmon/{ltc2978 => ltc2978.rst}  |   0
 Documentation/hwmon/{ltc2990 => ltc2990.rst}  |   0
 Documentation/hwmon/{ltc3815 => ltc3815.rst}  |   0
 Documentation/hwmon/{ltc4151 => ltc4151.rst}  |   0
 Documentation/hwmon/{ltc4215 => ltc4215.rst}  |   0
 Documentation/hwmon/{ltc4245 => ltc4245.rst}  |   0
 Documentation/hwmon/{ltc4260 => ltc4260.rst}  |   0
 Documentation/hwmon/{ltc4261 => ltc4261.rst}  |   0
 .../hwmon/{max16064 => max16064.rst}          |   2 +-
 .../hwmon/{max16065 => max16065.rst}          |   0
 Documentation/hwmon/{max1619 => max1619.rst}  |   0
 Documentation/hwmon/{max1668 => max1668.rst}  |   0
 Documentation/hwmon/{max197 => max197.rst}    |   0
 .../hwmon/{max20751 => max20751.rst}          |   2 +-
 .../hwmon/{max31722 => max31722.rst}          |   0
 .../hwmon/{max31785 => max31785.rst}          |   0
 .../hwmon/{max31790 => max31790.rst}          |   0
 .../hwmon/{max34440 => max34440.rst}          |   2 +-
 Documentation/hwmon/{max6639 => max6639.rst}  |   0
 Documentation/hwmon/{max6642 => max6642.rst}  |   0
 Documentation/hwmon/{max6650 => max6650.rst}  |   0
 Documentation/hwmon/{max6697 => max6697.rst}  |   0
 Documentation/hwmon/{max8688 => max8688.rst}  |   2 +-
 .../hwmon/{mc13783-adc => mc13783-adc.rst}    |   0
 Documentation/hwmon/{mcp3021 => mcp3021.rst}  |   0
 .../hwmon/{menf21bmc => menf21bmc.rst}        |   0
 .../hwmon/{mlxreg-fan => mlxreg-fan.rst}      |   0
 Documentation/hwmon/{nct6683 => nct6683.rst}  |   0
 Documentation/hwmon/{nct6775 => nct6775.rst}  |   0
 Documentation/hwmon/{nct7802 => nct7802.rst}  |   0
 Documentation/hwmon/{nct7904 => nct7904.rst}  |   0
 .../{npcm750-pwm-fan => npcm750-pwm-fan.rst}  |   0
 Documentation/hwmon/{nsa320 => nsa320.rst}    |   0
 .../{ntc_thermistor => ntc_thermistor.rst}    |   0
 Documentation/hwmon/{occ => occ.rst}          |   0
 Documentation/hwmon/{pc87360 => pc87360.rst}  |   0
 Documentation/hwmon/{pc87427 => pc87427.rst}  |   0
 Documentation/hwmon/{pcf8591 => pcf8591.rst}  |   0
 .../hwmon/{pmbus-core => pmbus-core.rst}      |   0
 Documentation/hwmon/{pmbus => pmbus.rst}      |   0
 .../hwmon/{powr1220 => powr1220.rst}          |   0
 Documentation/hwmon/{pwm-fan => pwm-fan.rst}  |   0
 ...aspberrypi-hwmon => raspberrypi-hwmon.rst} |   0
 Documentation/hwmon/{sch5627 => sch5627.rst}  |   0
 Documentation/hwmon/{sch5636 => sch5636.rst}  |   0
 .../hwmon/{scpi-hwmon => scpi-hwmon.rst}      |   0
 Documentation/hwmon/{sht15 => sht15.rst}      |   0
 Documentation/hwmon/{sht21 => sht21.rst}      |   0
 Documentation/hwmon/{sht3x => sht3x.rst}      |   0
 Documentation/hwmon/{shtc1 => shtc1.rst}      |   0
 Documentation/hwmon/{sis5595 => sis5595.rst}  |   0
 Documentation/hwmon/{smm665 => smm665.rst}    |   0
 .../hwmon/{smsc47b397 => smsc47b397.rst}      |   0
 .../hwmon/{smsc47m1 => smsc47m1.rst}          |   0
 .../hwmon/{smsc47m192 => smsc47m192.rst}      |   0
 ...mitting-patches => submitting-patches.rst} |   2 +-
 .../{sysfs-interface => sysfs-interface.rst}  |   0
 Documentation/hwmon/{tc654 => tc654.rst}      |   0
 Documentation/hwmon/{tc74 => tc74.rst}        |   0
 Documentation/hwmon/{thmc50 => thmc50.rst}    |   0
 Documentation/hwmon/{tmp102 => tmp102.rst}    |   2 +-
 Documentation/hwmon/{tmp103 => tmp103.rst}    |   2 +-
 Documentation/hwmon/{tmp108 => tmp108.rst}    |   2 +-
 Documentation/hwmon/{tmp401 => tmp401.rst}    |   2 +-
 Documentation/hwmon/{tmp421 => tmp421.rst}    |   0
 .../hwmon/{tps40422 => tps40422.rst}          |   2 +-
 ...4030-madc-hwmon => twl4030-madc-hwmon.rst} |   0
 Documentation/hwmon/{ucd9000 => ucd9000.rst}  |   4 +-
 Documentation/hwmon/{ucd9200 => ucd9200.rst}  |   4 +-
 .../{userspace-tools => userspace-tools.rst}  |   0
 .../hwmon/{vexpress => vexpress.rst}          |   0
 Documentation/hwmon/{via686a => via686a.rst}  |   0
 Documentation/hwmon/{vt1211 => vt1211.rst}    |   0
 .../hwmon/{w83627ehf => w83627ehf.rst}        |   0
 .../hwmon/{w83627hf => w83627hf.rst}          |   0
 Documentation/hwmon/{w83773g => w83773g.rst}  |   0
 Documentation/hwmon/{w83781d => w83781d.rst}  |   0
 Documentation/hwmon/{w83791d => w83791d.rst}  |   2 +-
 Documentation/hwmon/{w83792d => w83792d.rst}  |   0
 Documentation/hwmon/{w83793 => w83793.rst}    |   0
 Documentation/hwmon/{w83795 => w83795.rst}    |   0
 .../hwmon/{w83l785ts => w83l785ts.rst}        |   0
 .../hwmon/{w83l786ng => w83l786ng.rst}        |   0
 Documentation/hwmon/{wm831x => wm831x.rst}    |   0
 Documentation/hwmon/{wm8350 => wm8350.rst}    |   0
 .../hwmon/{xgene-hwmon => xgene-hwmon.rst}    |   0
 Documentation/hwmon/{zl6100 => zl6100.rst}    |   2 +-
 Documentation/index.rst                       |   1 +
 Documentation/thermal/sysfs-api.txt           |   2 +-
 MAINTAINERS                                   | 108 +++++------
 drivers/hwmon/Kconfig                         |   8 +-
 drivers/hwmon/ads7828.c                       |   2 +-
 drivers/hwmon/max197.c                        |   2 +-
 drivers/hwmon/sht15.c                         |   2 +-
 include/linux/platform_data/ads7828.h         |   2 +-
 include/linux/platform_data/ds620.h           |   2 +-
 include/linux/platform_data/ina2xx.h          |   2 +-
 include/linux/platform_data/max197.h          |   2 +-
 include/linux/platform_data/ntc_thermistor.h  |   2 +-
 173 files changed, 273 insertions(+), 93 deletions(-)
 rename Documentation/hwmon/{ab8500 => ab8500.rst} (86%)
 rename Documentation/hwmon/{abituguru-datasheet => abituguru-datasheet.rst} (100%)
 rename Documentation/hwmon/{abituguru => abituguru.rst} (100%)
 rename Documentation/hwmon/{abituguru3 => abituguru3.rst} (100%)
 rename Documentation/hwmon/{abx500 => abx500.rst} (100%)
 rename Documentation/hwmon/{acpi_power_meter => acpi_power_meter.rst} (97%)
 rename Documentation/hwmon/{ad7314 => ad7314.rst} (100%)
 rename Documentation/hwmon/{adc128d818 => adc128d818.rst} (100%)
 rename Documentation/hwmon/{adm1021 => adm1021.rst} (100%)
 rename Documentation/hwmon/{adm1025 => adm1025.rst} (100%)
 rename Documentation/hwmon/{adm1026 => adm1026.rst} (100%)
 rename Documentation/hwmon/{adm1031 => adm1031.rst} (100%)
 rename Documentation/hwmon/{adm1275 => adm1275.rst} (97%)
 rename Documentation/hwmon/{adm9240 => adm9240.rst} (100%)
 rename Documentation/hwmon/{ads1015 => ads1015.rst} (100%)
 rename Documentation/hwmon/{ads7828 => ads7828.rst} (100%)
 rename Documentation/hwmon/{adt7410 => adt7410.rst} (100%)
 rename Documentation/hwmon/{adt7411 => adt7411.rst} (100%)
 rename Documentation/hwmon/{adt7462 => adt7462.rst} (100%)
 rename Documentation/hwmon/{adt7470 => adt7470.rst} (100%)
 rename Documentation/hwmon/{adt7475 => adt7475.rst} (100%)
 rename Documentation/hwmon/{amc6821 => amc6821.rst} (100%)
 rename Documentation/hwmon/{asb100 => asb100.rst} (100%)
 rename Documentation/hwmon/{asc7621 => asc7621.rst} (100%)
 rename Documentation/hwmon/{aspeed-pwm-tacho => aspeed-pwm-tacho.rst} (100%)
 rename Documentation/hwmon/{coretemp => coretemp.rst} (100%)
 rename Documentation/hwmon/{da9052 => da9052.rst} (100%)
 rename Documentation/hwmon/{da9055 => da9055.rst} (100%)
 rename Documentation/hwmon/{dme1737 => dme1737.rst} (100%)
 rename Documentation/hwmon/{ds1621 => ds1621.rst} (100%)
 rename Documentation/hwmon/{ds620 => ds620.rst} (100%)
 rename Documentation/hwmon/{emc1403 => emc1403.rst} (100%)
 rename Documentation/hwmon/{emc2103 => emc2103.rst} (100%)
 rename Documentation/hwmon/{emc6w201 => emc6w201.rst} (100%)
 rename Documentation/hwmon/{f71805f => f71805f.rst} (100%)
 rename Documentation/hwmon/{f71882fg => f71882fg.rst} (100%)
 rename Documentation/hwmon/{fam15h_power => fam15h_power.rst} (100%)
 rename Documentation/hwmon/{ftsteutates => ftsteutates.rst} (100%)
 rename Documentation/hwmon/{g760a => g760a.rst} (100%)
 rename Documentation/hwmon/{g762 => g762.rst} (97%)
 rename Documentation/hwmon/{gl518sm => gl518sm.rst} (100%)
 rename Documentation/hwmon/{hih6130 => hih6130.rst} (100%)
 rename Documentation/hwmon/{hwmon-kernel-api.txt => hwmon-kernel-api.rst} (99%)
 rename Documentation/hwmon/{ibm-cffps => ibm-cffps.rst} (100%)
 rename Documentation/hwmon/{ibmaem => ibmaem.rst} (100%)
 rename Documentation/hwmon/{ibmpowernv => ibmpowernv.rst} (100%)
 rename Documentation/hwmon/{ina209 => ina209.rst} (100%)
 rename Documentation/hwmon/{ina2xx => ina2xx.rst} (97%)
 rename Documentation/hwmon/{ina3221 => ina3221.rst} (100%)
 create mode 100644 Documentation/hwmon/index.rst
 rename Documentation/hwmon/{ir35221 => ir35221.rst} (100%)
 rename Documentation/hwmon/{it87 => it87.rst} (100%)
 rename Documentation/hwmon/{jc42 => jc42.rst} (100%)
 rename Documentation/hwmon/{k10temp => k10temp.rst} (100%)
 rename Documentation/hwmon/{k8temp => k8temp.rst} (100%)
 rename Documentation/hwmon/{lineage-pem => lineage-pem.rst} (100%)
 rename Documentation/hwmon/{lm25066 => lm25066.rst} (97%)
 rename Documentation/hwmon/{lm63 => lm63.rst} (100%)
 rename Documentation/hwmon/{lm70 => lm70.rst} (100%)
 rename Documentation/hwmon/{lm73 => lm73.rst} (100%)
 rename Documentation/hwmon/{lm75 => lm75.rst} (100%)
 rename Documentation/hwmon/{lm77 => lm77.rst} (100%)
 rename Documentation/hwmon/{lm78 => lm78.rst} (100%)
 rename Documentation/hwmon/{lm80 => lm80.rst} (100%)
 rename Documentation/hwmon/{lm83 => lm83.rst} (100%)
 rename Documentation/hwmon/{lm85 => lm85.rst} (100%)
 rename Documentation/hwmon/{lm87 => lm87.rst} (100%)
 rename Documentation/hwmon/{lm90 => lm90.rst} (100%)
 rename Documentation/hwmon/{lm92 => lm92.rst} (100%)
 rename Documentation/hwmon/{lm93 => lm93.rst} (100%)
 rename Documentation/hwmon/{lm95234 => lm95234.rst} (100%)
 rename Documentation/hwmon/{lm95245 => lm95245.rst} (100%)
 rename Documentation/hwmon/{ltc2945 => ltc2945.rst} (100%)
 rename Documentation/hwmon/{ltc2978 => ltc2978.rst} (100%)
 rename Documentation/hwmon/{ltc2990 => ltc2990.rst} (100%)
 rename Documentation/hwmon/{ltc3815 => ltc3815.rst} (100%)
 rename Documentation/hwmon/{ltc4151 => ltc4151.rst} (100%)
 rename Documentation/hwmon/{ltc4215 => ltc4215.rst} (100%)
 rename Documentation/hwmon/{ltc4245 => ltc4245.rst} (100%)
 rename Documentation/hwmon/{ltc4260 => ltc4260.rst} (100%)
 rename Documentation/hwmon/{ltc4261 => ltc4261.rst} (100%)
 rename Documentation/hwmon/{max16064 => max16064.rst} (96%)
 rename Documentation/hwmon/{max16065 => max16065.rst} (100%)
 rename Documentation/hwmon/{max1619 => max1619.rst} (100%)
 rename Documentation/hwmon/{max1668 => max1668.rst} (100%)
 rename Documentation/hwmon/{max197 => max197.rst} (100%)
 rename Documentation/hwmon/{max20751 => max20751.rst} (96%)
 rename Documentation/hwmon/{max31722 => max31722.rst} (100%)
 rename Documentation/hwmon/{max31785 => max31785.rst} (100%)
 rename Documentation/hwmon/{max31790 => max31790.rst} (100%)
 rename Documentation/hwmon/{max34440 => max34440.rst} (98%)
 rename Documentation/hwmon/{max6639 => max6639.rst} (100%)
 rename Documentation/hwmon/{max6642 => max6642.rst} (100%)
 rename Documentation/hwmon/{max6650 => max6650.rst} (100%)
 rename Documentation/hwmon/{max6697 => max6697.rst} (100%)
 rename Documentation/hwmon/{max8688 => max8688.rst} (97%)
 rename Documentation/hwmon/{mc13783-adc => mc13783-adc.rst} (100%)
 rename Documentation/hwmon/{mcp3021 => mcp3021.rst} (100%)
 rename Documentation/hwmon/{menf21bmc => menf21bmc.rst} (100%)
 rename Documentation/hwmon/{mlxreg-fan => mlxreg-fan.rst} (100%)
 rename Documentation/hwmon/{nct6683 => nct6683.rst} (100%)
 rename Documentation/hwmon/{nct6775 => nct6775.rst} (100%)
 rename Documentation/hwmon/{nct7802 => nct7802.rst} (100%)
 rename Documentation/hwmon/{nct7904 => nct7904.rst} (100%)
 rename Documentation/hwmon/{npcm750-pwm-fan => npcm750-pwm-fan.rst} (100%)
 rename Documentation/hwmon/{nsa320 => nsa320.rst} (100%)
 rename Documentation/hwmon/{ntc_thermistor => ntc_thermistor.rst} (100%)
 rename Documentation/hwmon/{occ => occ.rst} (100%)
 rename Documentation/hwmon/{pc87360 => pc87360.rst} (100%)
 rename Documentation/hwmon/{pc87427 => pc87427.rst} (100%)
 rename Documentation/hwmon/{pcf8591 => pcf8591.rst} (100%)
 rename Documentation/hwmon/{pmbus-core => pmbus-core.rst} (100%)
 rename Documentation/hwmon/{pmbus => pmbus.rst} (100%)
 rename Documentation/hwmon/{powr1220 => powr1220.rst} (100%)
 rename Documentation/hwmon/{pwm-fan => pwm-fan.rst} (100%)
 rename Documentation/hwmon/{raspberrypi-hwmon => raspberrypi-hwmon.rst} (100%)
 rename Documentation/hwmon/{sch5627 => sch5627.rst} (100%)
 rename Documentation/hwmon/{sch5636 => sch5636.rst} (100%)
 rename Documentation/hwmon/{scpi-hwmon => scpi-hwmon.rst} (100%)
 rename Documentation/hwmon/{sht15 => sht15.rst} (100%)
 rename Documentation/hwmon/{sht21 => sht21.rst} (100%)
 rename Documentation/hwmon/{sht3x => sht3x.rst} (100%)
 rename Documentation/hwmon/{shtc1 => shtc1.rst} (100%)
 rename Documentation/hwmon/{sis5595 => sis5595.rst} (100%)
 rename Documentation/hwmon/{smm665 => smm665.rst} (100%)
 rename Documentation/hwmon/{smsc47b397 => smsc47b397.rst} (100%)
 rename Documentation/hwmon/{smsc47m1 => smsc47m1.rst} (100%)
 rename Documentation/hwmon/{smsc47m192 => smsc47m192.rst} (100%)
 rename Documentation/hwmon/{submitting-patches => submitting-patches.rst} (99%)
 rename Documentation/hwmon/{sysfs-interface => sysfs-interface.rst} (100%)
 rename Documentation/hwmon/{tc654 => tc654.rst} (100%)
 rename Documentation/hwmon/{tc74 => tc74.rst} (100%)
 rename Documentation/hwmon/{thmc50 => thmc50.rst} (100%)
 rename Documentation/hwmon/{tmp102 => tmp102.rst} (93%)
 rename Documentation/hwmon/{tmp103 => tmp103.rst} (92%)
 rename Documentation/hwmon/{tmp108 => tmp108.rst} (95%)
 rename Documentation/hwmon/{tmp401 => tmp401.rst} (97%)
 rename Documentation/hwmon/{tmp421 => tmp421.rst} (100%)
 rename Documentation/hwmon/{tps40422 => tps40422.rst} (96%)
 rename Documentation/hwmon/{twl4030-madc-hwmon => twl4030-madc-hwmon.rst} (100%)
 rename Documentation/hwmon/{ucd9000 => ucd9000.rst} (97%)
 rename Documentation/hwmon/{ucd9200 => ucd9200.rst} (97%)
 rename Documentation/hwmon/{userspace-tools => userspace-tools.rst} (100%)
 rename Documentation/hwmon/{vexpress => vexpress.rst} (100%)
 rename Documentation/hwmon/{via686a => via686a.rst} (100%)
 rename Documentation/hwmon/{vt1211 => vt1211.rst} (100%)
 rename Documentation/hwmon/{w83627ehf => w83627ehf.rst} (100%)
 rename Documentation/hwmon/{w83627hf => w83627hf.rst} (100%)
 rename Documentation/hwmon/{w83773g => w83773g.rst} (100%)
 rename Documentation/hwmon/{w83781d => w83781d.rst} (100%)
 rename Documentation/hwmon/{w83791d => w83791d.rst} (99%)
 rename Documentation/hwmon/{w83792d => w83792d.rst} (100%)
 rename Documentation/hwmon/{w83793 => w83793.rst} (100%)
 rename Documentation/hwmon/{w83795 => w83795.rst} (100%)
 rename Documentation/hwmon/{w83l785ts => w83l785ts.rst} (100%)
 rename Documentation/hwmon/{w83l786ng => w83l786ng.rst} (100%)
 rename Documentation/hwmon/{wm831x => wm831x.rst} (100%)
 rename Documentation/hwmon/{wm8350 => wm8350.rst} (100%)
 rename Documentation/hwmon/{xgene-hwmon => xgene-hwmon.rst} (100%)
 rename Documentation/hwmon/{zl6100 => zl6100.rst} (98%)

diff --git a/Documentation/devicetree/bindings/hwmon/g762.txt b/Documentation/devicetree/bindings/hwmon/g762.txt
index 25cc6d8ee575..6d154c4923de 100644
--- a/Documentation/devicetree/bindings/hwmon/g762.txt
+++ b/Documentation/devicetree/bindings/hwmon/g762.txt
@@ -21,7 +21,7 @@ If an optional property is not set in .dts file, then current value is kept
 unmodified (e.g. u-boot installed value).
 
 Additional information on operational parameters for the device is available
-in Documentation/hwmon/g762. A detailed datasheet for the device is available
+in Documentation/hwmon/g762.rst. A detailed datasheet for the device is available
 at http://natisbad.org/NAS/refs/GMT_EDS-762_763-080710-0.2.pdf.
 
 Example g762 node:
diff --git a/Documentation/hwmon/ab8500 b/Documentation/hwmon/ab8500.rst
similarity index 86%
rename from Documentation/hwmon/ab8500
rename to Documentation/hwmon/ab8500.rst
index d87c61151239..33f93a9cec04 100644
--- a/Documentation/hwmon/ab8500
+++ b/Documentation/hwmon/ab8500.rst
@@ -18,7 +18,7 @@ Authors:
 Description
 -----------
 
-See also Documentation/hwmon/abx500. This is the ST-Ericsson AB8500 specific
+See also Documentation/hwmon/abx500.rst. This is the ST-Ericsson AB8500 specific
 driver.
 
 Currently only the AB8500 internal sensor and one external sensor for battery
diff --git a/Documentation/hwmon/abituguru-datasheet b/Documentation/hwmon/abituguru-datasheet.rst
similarity index 100%
rename from Documentation/hwmon/abituguru-datasheet
rename to Documentation/hwmon/abituguru-datasheet.rst
diff --git a/Documentation/hwmon/abituguru b/Documentation/hwmon/abituguru.rst
similarity index 100%
rename from Documentation/hwmon/abituguru
rename to Documentation/hwmon/abituguru.rst
diff --git a/Documentation/hwmon/abituguru3 b/Documentation/hwmon/abituguru3.rst
similarity index 100%
rename from Documentation/hwmon/abituguru3
rename to Documentation/hwmon/abituguru3.rst
diff --git a/Documentation/hwmon/abx500 b/Documentation/hwmon/abx500.rst
similarity index 100%
rename from Documentation/hwmon/abx500
rename to Documentation/hwmon/abx500.rst
diff --git a/Documentation/hwmon/acpi_power_meter b/Documentation/hwmon/acpi_power_meter.rst
similarity index 97%
rename from Documentation/hwmon/acpi_power_meter
rename to Documentation/hwmon/acpi_power_meter.rst
index 7665ca6ba957..4a0941ade0ca 100644
--- a/Documentation/hwmon/acpi_power_meter
+++ b/Documentation/hwmon/acpi_power_meter.rst
@@ -21,7 +21,7 @@ the ACPI 4.0 spec (Chapter 10.4).  These devices have a simple set of
 features--a power meter that returns average power use over a configurable
 interval, an optional capping mechanism, and a couple of trip points.  The
 sysfs interface conforms with the specification outlined in the "Power" section
-of Documentation/hwmon/sysfs-interface.
+of Documentation/hwmon/sysfs-interface.rst.
 
 Special Features
 ----------------
diff --git a/Documentation/hwmon/ad7314 b/Documentation/hwmon/ad7314.rst
similarity index 100%
rename from Documentation/hwmon/ad7314
rename to Documentation/hwmon/ad7314.rst
diff --git a/Documentation/hwmon/adc128d818 b/Documentation/hwmon/adc128d818.rst
similarity index 100%
rename from Documentation/hwmon/adc128d818
rename to Documentation/hwmon/adc128d818.rst
diff --git a/Documentation/hwmon/adm1021 b/Documentation/hwmon/adm1021.rst
similarity index 100%
rename from Documentation/hwmon/adm1021
rename to Documentation/hwmon/adm1021.rst
diff --git a/Documentation/hwmon/adm1025 b/Documentation/hwmon/adm1025.rst
similarity index 100%
rename from Documentation/hwmon/adm1025
rename to Documentation/hwmon/adm1025.rst
diff --git a/Documentation/hwmon/adm1026 b/Documentation/hwmon/adm1026.rst
similarity index 100%
rename from Documentation/hwmon/adm1026
rename to Documentation/hwmon/adm1026.rst
diff --git a/Documentation/hwmon/adm1031 b/Documentation/hwmon/adm1031.rst
similarity index 100%
rename from Documentation/hwmon/adm1031
rename to Documentation/hwmon/adm1031.rst
diff --git a/Documentation/hwmon/adm1275 b/Documentation/hwmon/adm1275.rst
similarity index 97%
rename from Documentation/hwmon/adm1275
rename to Documentation/hwmon/adm1275.rst
index 5c5860011d6e..9a1913e5b4d9 100644
--- a/Documentation/hwmon/adm1275
+++ b/Documentation/hwmon/adm1275.rst
@@ -68,7 +68,7 @@ integrated 12 bit analog-to-digital converter (ADC), accessed using a
 PMBus interface.
 
 The driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
@@ -90,7 +90,7 @@ Platform data support
 ---------------------
 
 The driver supports standard PMBus driver platform data. Please see
-Documentation/hwmon/pmbus for details.
+Documentation/hwmon/pmbus.rst for details.
 
 
 Sysfs entries
diff --git a/Documentation/hwmon/adm9240 b/Documentation/hwmon/adm9240.rst
similarity index 100%
rename from Documentation/hwmon/adm9240
rename to Documentation/hwmon/adm9240.rst
diff --git a/Documentation/hwmon/ads1015 b/Documentation/hwmon/ads1015.rst
similarity index 100%
rename from Documentation/hwmon/ads1015
rename to Documentation/hwmon/ads1015.rst
diff --git a/Documentation/hwmon/ads7828 b/Documentation/hwmon/ads7828.rst
similarity index 100%
rename from Documentation/hwmon/ads7828
rename to Documentation/hwmon/ads7828.rst
diff --git a/Documentation/hwmon/adt7410 b/Documentation/hwmon/adt7410.rst
similarity index 100%
rename from Documentation/hwmon/adt7410
rename to Documentation/hwmon/adt7410.rst
diff --git a/Documentation/hwmon/adt7411 b/Documentation/hwmon/adt7411.rst
similarity index 100%
rename from Documentation/hwmon/adt7411
rename to Documentation/hwmon/adt7411.rst
diff --git a/Documentation/hwmon/adt7462 b/Documentation/hwmon/adt7462.rst
similarity index 100%
rename from Documentation/hwmon/adt7462
rename to Documentation/hwmon/adt7462.rst
diff --git a/Documentation/hwmon/adt7470 b/Documentation/hwmon/adt7470.rst
similarity index 100%
rename from Documentation/hwmon/adt7470
rename to Documentation/hwmon/adt7470.rst
diff --git a/Documentation/hwmon/adt7475 b/Documentation/hwmon/adt7475.rst
similarity index 100%
rename from Documentation/hwmon/adt7475
rename to Documentation/hwmon/adt7475.rst
diff --git a/Documentation/hwmon/amc6821 b/Documentation/hwmon/amc6821.rst
similarity index 100%
rename from Documentation/hwmon/amc6821
rename to Documentation/hwmon/amc6821.rst
diff --git a/Documentation/hwmon/asb100 b/Documentation/hwmon/asb100.rst
similarity index 100%
rename from Documentation/hwmon/asb100
rename to Documentation/hwmon/asb100.rst
diff --git a/Documentation/hwmon/asc7621 b/Documentation/hwmon/asc7621.rst
similarity index 100%
rename from Documentation/hwmon/asc7621
rename to Documentation/hwmon/asc7621.rst
diff --git a/Documentation/hwmon/aspeed-pwm-tacho b/Documentation/hwmon/aspeed-pwm-tacho.rst
similarity index 100%
rename from Documentation/hwmon/aspeed-pwm-tacho
rename to Documentation/hwmon/aspeed-pwm-tacho.rst
diff --git a/Documentation/hwmon/coretemp b/Documentation/hwmon/coretemp.rst
similarity index 100%
rename from Documentation/hwmon/coretemp
rename to Documentation/hwmon/coretemp.rst
diff --git a/Documentation/hwmon/da9052 b/Documentation/hwmon/da9052.rst
similarity index 100%
rename from Documentation/hwmon/da9052
rename to Documentation/hwmon/da9052.rst
diff --git a/Documentation/hwmon/da9055 b/Documentation/hwmon/da9055.rst
similarity index 100%
rename from Documentation/hwmon/da9055
rename to Documentation/hwmon/da9055.rst
diff --git a/Documentation/hwmon/dme1737 b/Documentation/hwmon/dme1737.rst
similarity index 100%
rename from Documentation/hwmon/dme1737
rename to Documentation/hwmon/dme1737.rst
diff --git a/Documentation/hwmon/ds1621 b/Documentation/hwmon/ds1621.rst
similarity index 100%
rename from Documentation/hwmon/ds1621
rename to Documentation/hwmon/ds1621.rst
diff --git a/Documentation/hwmon/ds620 b/Documentation/hwmon/ds620.rst
similarity index 100%
rename from Documentation/hwmon/ds620
rename to Documentation/hwmon/ds620.rst
diff --git a/Documentation/hwmon/emc1403 b/Documentation/hwmon/emc1403.rst
similarity index 100%
rename from Documentation/hwmon/emc1403
rename to Documentation/hwmon/emc1403.rst
diff --git a/Documentation/hwmon/emc2103 b/Documentation/hwmon/emc2103.rst
similarity index 100%
rename from Documentation/hwmon/emc2103
rename to Documentation/hwmon/emc2103.rst
diff --git a/Documentation/hwmon/emc6w201 b/Documentation/hwmon/emc6w201.rst
similarity index 100%
rename from Documentation/hwmon/emc6w201
rename to Documentation/hwmon/emc6w201.rst
diff --git a/Documentation/hwmon/f71805f b/Documentation/hwmon/f71805f.rst
similarity index 100%
rename from Documentation/hwmon/f71805f
rename to Documentation/hwmon/f71805f.rst
diff --git a/Documentation/hwmon/f71882fg b/Documentation/hwmon/f71882fg.rst
similarity index 100%
rename from Documentation/hwmon/f71882fg
rename to Documentation/hwmon/f71882fg.rst
diff --git a/Documentation/hwmon/fam15h_power b/Documentation/hwmon/fam15h_power.rst
similarity index 100%
rename from Documentation/hwmon/fam15h_power
rename to Documentation/hwmon/fam15h_power.rst
diff --git a/Documentation/hwmon/ftsteutates b/Documentation/hwmon/ftsteutates.rst
similarity index 100%
rename from Documentation/hwmon/ftsteutates
rename to Documentation/hwmon/ftsteutates.rst
diff --git a/Documentation/hwmon/g760a b/Documentation/hwmon/g760a.rst
similarity index 100%
rename from Documentation/hwmon/g760a
rename to Documentation/hwmon/g760a.rst
diff --git a/Documentation/hwmon/g762 b/Documentation/hwmon/g762.rst
similarity index 97%
rename from Documentation/hwmon/g762
rename to Documentation/hwmon/g762.rst
index 54574e26df21..0371b3365c48 100644
--- a/Documentation/hwmon/g762
+++ b/Documentation/hwmon/g762.rst
@@ -7,7 +7,7 @@ modes - PWM or DC - are supported by the device.
 
 For additional information, a detailed datasheet is available at
 http://natisbad.org/NAS/ref/GMT_EDS-762_763-080710-0.2.pdf. sysfs
-bindings are described in Documentation/hwmon/sysfs-interface.
+bindings are described in Documentation/hwmon/sysfs-interface.rst.
 
 The following entries are available to the user in a subdirectory of
 /sys/bus/i2c/drivers/g762/ to control the operation of the device.
diff --git a/Documentation/hwmon/gl518sm b/Documentation/hwmon/gl518sm.rst
similarity index 100%
rename from Documentation/hwmon/gl518sm
rename to Documentation/hwmon/gl518sm.rst
diff --git a/Documentation/hwmon/hih6130 b/Documentation/hwmon/hih6130.rst
similarity index 100%
rename from Documentation/hwmon/hih6130
rename to Documentation/hwmon/hih6130.rst
diff --git a/Documentation/hwmon/hwmon-kernel-api.txt b/Documentation/hwmon/hwmon-kernel-api.rst
similarity index 99%
rename from Documentation/hwmon/hwmon-kernel-api.txt
rename to Documentation/hwmon/hwmon-kernel-api.rst
index b56343f5c2c4..5766bee64153 100644
--- a/Documentation/hwmon/hwmon-kernel-api.txt
+++ b/Documentation/hwmon/hwmon-kernel-api.rst
@@ -12,10 +12,10 @@ drivers that want to use the hardware monitoring framework.
 This document does not describe what a hardware monitoring (hwmon) Driver or
 Device is. It also does not describe the API which can be used by user space
 to communicate with a hardware monitoring device. If you want to know this
-then please read the following file: Documentation/hwmon/sysfs-interface.
+then please read the following file: Documentation/hwmon/sysfs-interface.rst.
 
 For additional guidelines on how to write and improve hwmon drivers, please
-also read Documentation/hwmon/submitting-patches.
+also read Documentation/hwmon/submitting-patches.rst.
 
 The API
 -------
diff --git a/Documentation/hwmon/ibm-cffps b/Documentation/hwmon/ibm-cffps.rst
similarity index 100%
rename from Documentation/hwmon/ibm-cffps
rename to Documentation/hwmon/ibm-cffps.rst
diff --git a/Documentation/hwmon/ibmaem b/Documentation/hwmon/ibmaem.rst
similarity index 100%
rename from Documentation/hwmon/ibmaem
rename to Documentation/hwmon/ibmaem.rst
diff --git a/Documentation/hwmon/ibmpowernv b/Documentation/hwmon/ibmpowernv.rst
similarity index 100%
rename from Documentation/hwmon/ibmpowernv
rename to Documentation/hwmon/ibmpowernv.rst
diff --git a/Documentation/hwmon/ina209 b/Documentation/hwmon/ina209.rst
similarity index 100%
rename from Documentation/hwmon/ina209
rename to Documentation/hwmon/ina209.rst
diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx.rst
similarity index 97%
rename from Documentation/hwmon/ina2xx
rename to Documentation/hwmon/ina2xx.rst
index 95badf9c396f..94b9a260c518 100644
--- a/Documentation/hwmon/ina2xx
+++ b/Documentation/hwmon/ina2xx.rst
@@ -78,7 +78,7 @@ refer to the Documentation/devicetree/bindings/hwmon/ina2xx.txt for bindings
 if the device tree is used.
 
 Additionally ina226 supports update_interval attribute as described in
-Documentation/hwmon/sysfs-interface. Internally the interval is the sum of
+Documentation/hwmon/sysfs-interface.rst. Internally the interval is the sum of
 bus and shunt voltage conversion times multiplied by the averaging rate. We
 don't touch the conversion times and only modify the number of averages. The
 lower limit of the update_interval is 2 ms, the upper limit is 2253 ms.
diff --git a/Documentation/hwmon/ina3221 b/Documentation/hwmon/ina3221.rst
similarity index 100%
rename from Documentation/hwmon/ina3221
rename to Documentation/hwmon/ina3221.rst
diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst
new file mode 100644
index 000000000000..893804414510
--- /dev/null
+++ b/Documentation/hwmon/index.rst
@@ -0,0 +1,179 @@
+=========================
+Linux Hardware Monitoring
+=========================
+
+.. toctree::
+   :maxdepth: 1
+
+   hwmon-kernel-api.rst
+   pmbus-core.rst
+   submitting-patches.rst
+   sysfs-interface.rst
+   userspace-tools.rst
+
+Hardware Monitoring Kernel Drivers
+==================================
+
+.. toctree::
+   :maxdepth: 1
+
+   ab8500.rst
+   abituguru.rst
+   abituguru3.rst
+   abx500.rst
+   acpi_power_meter.rst
+   ad7314.rst
+   adc128d818.rst
+   adm1021.rst
+   adm1025.rst
+   adm1026.rst
+   adm1031.rst
+   adm1275.rst
+   adm9240.rst
+   ads1015.rst
+   ads7828.rst
+   adt7410.rst
+   adt7411.rst
+   adt7462.rst
+   adt7470.rst
+   adt7475.rst
+   amc6821.rst
+   asb100.rst
+   asc7621.rst
+   aspeed-pwm-tacho.rst
+   coretemp.rst
+   da9052.rst
+   da9055.rst
+   dme1737.rst
+   ds1621.rst
+   ds620.rst
+   emc1403.rst
+   emc2103.rst
+   emc6w201.rst
+   f71805f.rst
+   f71882fg.rst
+   fam15h_power.rst
+   ftsteutates.rst
+   g760a.rst
+   g762.rst
+   gl518sm.rst
+   hih6130.rst
+   ibmaem.rst
+   ibm-cffps.rst
+   ibmpowernv.rst
+   ina209.rst
+   ina2xx.rst
+   ina3221.rst
+   ir35221.rst
+   it87.rst
+   jc42.rst
+   k10temp.rst
+   k8temp.rst
+   lineage-pem.rst
+   lm25066.rst
+   lm63.rst
+   lm70.rst
+   lm73.rst
+   lm75.rst
+   lm77.rst
+   lm78.rst
+   lm80.rst
+   lm83.rst
+   lm85.rst
+   lm87.rst
+   lm90.rst
+   lm92.rst
+   lm93.rst
+   lm95234.rst
+   lm95245.rst
+   ltc2945.rst
+   ltc2978.rst
+   ltc2990.rst
+   ltc3815.rst
+   ltc4151.rst
+   ltc4215.rst
+   ltc4245.rst
+   ltc4260.rst
+   ltc4261.rst
+   max16064.rst
+   max16065.rst
+   max1619.rst
+   max1668.rst
+   max197.rst
+   max20751.rst
+   max31722.rst
+   max31785.rst
+   max31790.rst
+   max34440.rst
+   max6639.rst
+   max6642.rst
+   max6650.rst
+   max6697.rst
+   max8688.rst
+   mc13783-adc.rst
+   mcp3021.rst
+   menf21bmc.rst
+   mlxreg-fan.rst
+   nct6683.rst
+   nct6775.rst
+   nct7802.rst
+   nct7904.rst
+   npcm750-pwm-fan.rst
+   nsa320.rst
+   ntc_thermistor.rst
+   occ.rst
+   pc87360.rst
+   pc87427.rst
+   pcf8591.rst
+   pmbus.rst
+   powr1220.rst
+   pwm-fan.rst
+   raspberrypi-hwmon.rst
+   sch5627.rst
+   sch5636.rst
+   scpi-hwmon.rst
+   sht15.rst
+   sht21.rst
+   sht3x.rst
+   shtc1.rst
+   sis5595.rst
+   smm665.rst
+   smsc47b397.rst
+   smsc47m192.rst
+   smsc47m1.rst
+   tc654.rst
+   tc74.rst
+   thmc50.rst
+   tmp102.rst
+   tmp103.rst
+   tmp108.rst
+   tmp401.rst
+   tmp421.rst
+   tps40422.rst
+   twl4030-madc-hwmon.rst
+   ucd9000.rst
+   ucd9200.rst
+   vexpress.rst
+   via686a.rst
+   vt1211.rst
+   w83627ehf.rst
+   w83627hf.rst
+   w83773g.rst
+   w83781d.rst
+   w83791d.rst
+   w83792d.rst
+   w83793.rst
+   w83795.rst
+   w83l785ts.rst
+   w83l786ng.rst
+   wm831x.rst
+   wm8350.rst
+   xgene-hwmon.rst
+   zl6100.rst
+
+.. only::  subproject and html
+
+   Indices
+   =======
+
+   * :ref:`genindex`
diff --git a/Documentation/hwmon/ir35221 b/Documentation/hwmon/ir35221.rst
similarity index 100%
rename from Documentation/hwmon/ir35221
rename to Documentation/hwmon/ir35221.rst
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87.rst
similarity index 100%
rename from Documentation/hwmon/it87
rename to Documentation/hwmon/it87.rst
diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42.rst
similarity index 100%
rename from Documentation/hwmon/jc42
rename to Documentation/hwmon/jc42.rst
diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp.rst
similarity index 100%
rename from Documentation/hwmon/k10temp
rename to Documentation/hwmon/k10temp.rst
diff --git a/Documentation/hwmon/k8temp b/Documentation/hwmon/k8temp.rst
similarity index 100%
rename from Documentation/hwmon/k8temp
rename to Documentation/hwmon/k8temp.rst
diff --git a/Documentation/hwmon/lineage-pem b/Documentation/hwmon/lineage-pem.rst
similarity index 100%
rename from Documentation/hwmon/lineage-pem
rename to Documentation/hwmon/lineage-pem.rst
diff --git a/Documentation/hwmon/lm25066 b/Documentation/hwmon/lm25066.rst
similarity index 97%
rename from Documentation/hwmon/lm25066
rename to Documentation/hwmon/lm25066.rst
index 60b7f2722931..da15e3094c8c 100644
--- a/Documentation/hwmon/lm25066
+++ b/Documentation/hwmon/lm25066.rst
@@ -69,7 +69,7 @@ LM25066, LM5064, and LM5066/LM5066I Power Management, Monitoring,
 Control, and Protection ICs.
 
 The driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/lm63 b/Documentation/hwmon/lm63.rst
similarity index 100%
rename from Documentation/hwmon/lm63
rename to Documentation/hwmon/lm63.rst
diff --git a/Documentation/hwmon/lm70 b/Documentation/hwmon/lm70.rst
similarity index 100%
rename from Documentation/hwmon/lm70
rename to Documentation/hwmon/lm70.rst
diff --git a/Documentation/hwmon/lm73 b/Documentation/hwmon/lm73.rst
similarity index 100%
rename from Documentation/hwmon/lm73
rename to Documentation/hwmon/lm73.rst
diff --git a/Documentation/hwmon/lm75 b/Documentation/hwmon/lm75.rst
similarity index 100%
rename from Documentation/hwmon/lm75
rename to Documentation/hwmon/lm75.rst
diff --git a/Documentation/hwmon/lm77 b/Documentation/hwmon/lm77.rst
similarity index 100%
rename from Documentation/hwmon/lm77
rename to Documentation/hwmon/lm77.rst
diff --git a/Documentation/hwmon/lm78 b/Documentation/hwmon/lm78.rst
similarity index 100%
rename from Documentation/hwmon/lm78
rename to Documentation/hwmon/lm78.rst
diff --git a/Documentation/hwmon/lm80 b/Documentation/hwmon/lm80.rst
similarity index 100%
rename from Documentation/hwmon/lm80
rename to Documentation/hwmon/lm80.rst
diff --git a/Documentation/hwmon/lm83 b/Documentation/hwmon/lm83.rst
similarity index 100%
rename from Documentation/hwmon/lm83
rename to Documentation/hwmon/lm83.rst
diff --git a/Documentation/hwmon/lm85 b/Documentation/hwmon/lm85.rst
similarity index 100%
rename from Documentation/hwmon/lm85
rename to Documentation/hwmon/lm85.rst
diff --git a/Documentation/hwmon/lm87 b/Documentation/hwmon/lm87.rst
similarity index 100%
rename from Documentation/hwmon/lm87
rename to Documentation/hwmon/lm87.rst
diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90.rst
similarity index 100%
rename from Documentation/hwmon/lm90
rename to Documentation/hwmon/lm90.rst
diff --git a/Documentation/hwmon/lm92 b/Documentation/hwmon/lm92.rst
similarity index 100%
rename from Documentation/hwmon/lm92
rename to Documentation/hwmon/lm92.rst
diff --git a/Documentation/hwmon/lm93 b/Documentation/hwmon/lm93.rst
similarity index 100%
rename from Documentation/hwmon/lm93
rename to Documentation/hwmon/lm93.rst
diff --git a/Documentation/hwmon/lm95234 b/Documentation/hwmon/lm95234.rst
similarity index 100%
rename from Documentation/hwmon/lm95234
rename to Documentation/hwmon/lm95234.rst
diff --git a/Documentation/hwmon/lm95245 b/Documentation/hwmon/lm95245.rst
similarity index 100%
rename from Documentation/hwmon/lm95245
rename to Documentation/hwmon/lm95245.rst
diff --git a/Documentation/hwmon/ltc2945 b/Documentation/hwmon/ltc2945.rst
similarity index 100%
rename from Documentation/hwmon/ltc2945
rename to Documentation/hwmon/ltc2945.rst
diff --git a/Documentation/hwmon/ltc2978 b/Documentation/hwmon/ltc2978.rst
similarity index 100%
rename from Documentation/hwmon/ltc2978
rename to Documentation/hwmon/ltc2978.rst
diff --git a/Documentation/hwmon/ltc2990 b/Documentation/hwmon/ltc2990.rst
similarity index 100%
rename from Documentation/hwmon/ltc2990
rename to Documentation/hwmon/ltc2990.rst
diff --git a/Documentation/hwmon/ltc3815 b/Documentation/hwmon/ltc3815.rst
similarity index 100%
rename from Documentation/hwmon/ltc3815
rename to Documentation/hwmon/ltc3815.rst
diff --git a/Documentation/hwmon/ltc4151 b/Documentation/hwmon/ltc4151.rst
similarity index 100%
rename from Documentation/hwmon/ltc4151
rename to Documentation/hwmon/ltc4151.rst
diff --git a/Documentation/hwmon/ltc4215 b/Documentation/hwmon/ltc4215.rst
similarity index 100%
rename from Documentation/hwmon/ltc4215
rename to Documentation/hwmon/ltc4215.rst
diff --git a/Documentation/hwmon/ltc4245 b/Documentation/hwmon/ltc4245.rst
similarity index 100%
rename from Documentation/hwmon/ltc4245
rename to Documentation/hwmon/ltc4245.rst
diff --git a/Documentation/hwmon/ltc4260 b/Documentation/hwmon/ltc4260.rst
similarity index 100%
rename from Documentation/hwmon/ltc4260
rename to Documentation/hwmon/ltc4260.rst
diff --git a/Documentation/hwmon/ltc4261 b/Documentation/hwmon/ltc4261.rst
similarity index 100%
rename from Documentation/hwmon/ltc4261
rename to Documentation/hwmon/ltc4261.rst
diff --git a/Documentation/hwmon/max16064 b/Documentation/hwmon/max16064.rst
similarity index 96%
rename from Documentation/hwmon/max16064
rename to Documentation/hwmon/max16064.rst
index 61ec679dc477..6d5e9538991f 100644
--- a/Documentation/hwmon/max16064
+++ b/Documentation/hwmon/max16064.rst
@@ -21,7 +21,7 @@ This driver supports hardware monitoring for Maxim MAX16064 Quad Power-Supply
 Controller with Active-Voltage Output Control and PMBus Interface.
 
 The driver is a client driver to the core PMBus driver.
-Please see Documentation/hwmon/pmbus for details on PMBus client drivers.
+Please see Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/max16065 b/Documentation/hwmon/max16065.rst
similarity index 100%
rename from Documentation/hwmon/max16065
rename to Documentation/hwmon/max16065.rst
diff --git a/Documentation/hwmon/max1619 b/Documentation/hwmon/max1619.rst
similarity index 100%
rename from Documentation/hwmon/max1619
rename to Documentation/hwmon/max1619.rst
diff --git a/Documentation/hwmon/max1668 b/Documentation/hwmon/max1668.rst
similarity index 100%
rename from Documentation/hwmon/max1668
rename to Documentation/hwmon/max1668.rst
diff --git a/Documentation/hwmon/max197 b/Documentation/hwmon/max197.rst
similarity index 100%
rename from Documentation/hwmon/max197
rename to Documentation/hwmon/max197.rst
diff --git a/Documentation/hwmon/max20751 b/Documentation/hwmon/max20751.rst
similarity index 96%
rename from Documentation/hwmon/max20751
rename to Documentation/hwmon/max20751.rst
index d546695900ef..aa4469be6674 100644
--- a/Documentation/hwmon/max20751
+++ b/Documentation/hwmon/max20751.rst
@@ -23,7 +23,7 @@ This driver supports MAX20751 Multiphase Master with PMBus Interface
 and Internal Buck Converter.
 
 The driver is a client driver to the core PMBus driver.
-Please see Documentation/hwmon/pmbus for details on PMBus client drivers.
+Please see Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/max31722 b/Documentation/hwmon/max31722.rst
similarity index 100%
rename from Documentation/hwmon/max31722
rename to Documentation/hwmon/max31722.rst
diff --git a/Documentation/hwmon/max31785 b/Documentation/hwmon/max31785.rst
similarity index 100%
rename from Documentation/hwmon/max31785
rename to Documentation/hwmon/max31785.rst
diff --git a/Documentation/hwmon/max31790 b/Documentation/hwmon/max31790.rst
similarity index 100%
rename from Documentation/hwmon/max31790
rename to Documentation/hwmon/max31790.rst
diff --git a/Documentation/hwmon/max34440 b/Documentation/hwmon/max34440.rst
similarity index 98%
rename from Documentation/hwmon/max34440
rename to Documentation/hwmon/max34440.rst
index 639838ef29fd..939138e12b02 100644
--- a/Documentation/hwmon/max34440
+++ b/Documentation/hwmon/max34440.rst
@@ -76,7 +76,7 @@ based on GIN pins. The MAX34460 supports 12 voltage channels, and the MAX34461
 supports 16 voltage channels.
 
 The driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/max6639 b/Documentation/hwmon/max6639.rst
similarity index 100%
rename from Documentation/hwmon/max6639
rename to Documentation/hwmon/max6639.rst
diff --git a/Documentation/hwmon/max6642 b/Documentation/hwmon/max6642.rst
similarity index 100%
rename from Documentation/hwmon/max6642
rename to Documentation/hwmon/max6642.rst
diff --git a/Documentation/hwmon/max6650 b/Documentation/hwmon/max6650.rst
similarity index 100%
rename from Documentation/hwmon/max6650
rename to Documentation/hwmon/max6650.rst
diff --git a/Documentation/hwmon/max6697 b/Documentation/hwmon/max6697.rst
similarity index 100%
rename from Documentation/hwmon/max6697
rename to Documentation/hwmon/max6697.rst
diff --git a/Documentation/hwmon/max8688 b/Documentation/hwmon/max8688.rst
similarity index 97%
rename from Documentation/hwmon/max8688
rename to Documentation/hwmon/max8688.rst
index 43da139234c1..009487759c61 100644
--- a/Documentation/hwmon/max8688
+++ b/Documentation/hwmon/max8688.rst
@@ -21,7 +21,7 @@ This driver supports hardware monitoring for Maxim MAX8688 Digital Power-Supply
 Controller/Monitor with PMBus Interface.
 
 The driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/mc13783-adc b/Documentation/hwmon/mc13783-adc.rst
similarity index 100%
rename from Documentation/hwmon/mc13783-adc
rename to Documentation/hwmon/mc13783-adc.rst
diff --git a/Documentation/hwmon/mcp3021 b/Documentation/hwmon/mcp3021.rst
similarity index 100%
rename from Documentation/hwmon/mcp3021
rename to Documentation/hwmon/mcp3021.rst
diff --git a/Documentation/hwmon/menf21bmc b/Documentation/hwmon/menf21bmc.rst
similarity index 100%
rename from Documentation/hwmon/menf21bmc
rename to Documentation/hwmon/menf21bmc.rst
diff --git a/Documentation/hwmon/mlxreg-fan b/Documentation/hwmon/mlxreg-fan.rst
similarity index 100%
rename from Documentation/hwmon/mlxreg-fan
rename to Documentation/hwmon/mlxreg-fan.rst
diff --git a/Documentation/hwmon/nct6683 b/Documentation/hwmon/nct6683.rst
similarity index 100%
rename from Documentation/hwmon/nct6683
rename to Documentation/hwmon/nct6683.rst
diff --git a/Documentation/hwmon/nct6775 b/Documentation/hwmon/nct6775.rst
similarity index 100%
rename from Documentation/hwmon/nct6775
rename to Documentation/hwmon/nct6775.rst
diff --git a/Documentation/hwmon/nct7802 b/Documentation/hwmon/nct7802.rst
similarity index 100%
rename from Documentation/hwmon/nct7802
rename to Documentation/hwmon/nct7802.rst
diff --git a/Documentation/hwmon/nct7904 b/Documentation/hwmon/nct7904.rst
similarity index 100%
rename from Documentation/hwmon/nct7904
rename to Documentation/hwmon/nct7904.rst
diff --git a/Documentation/hwmon/npcm750-pwm-fan b/Documentation/hwmon/npcm750-pwm-fan.rst
similarity index 100%
rename from Documentation/hwmon/npcm750-pwm-fan
rename to Documentation/hwmon/npcm750-pwm-fan.rst
diff --git a/Documentation/hwmon/nsa320 b/Documentation/hwmon/nsa320.rst
similarity index 100%
rename from Documentation/hwmon/nsa320
rename to Documentation/hwmon/nsa320.rst
diff --git a/Documentation/hwmon/ntc_thermistor b/Documentation/hwmon/ntc_thermistor.rst
similarity index 100%
rename from Documentation/hwmon/ntc_thermistor
rename to Documentation/hwmon/ntc_thermistor.rst
diff --git a/Documentation/hwmon/occ b/Documentation/hwmon/occ.rst
similarity index 100%
rename from Documentation/hwmon/occ
rename to Documentation/hwmon/occ.rst
diff --git a/Documentation/hwmon/pc87360 b/Documentation/hwmon/pc87360.rst
similarity index 100%
rename from Documentation/hwmon/pc87360
rename to Documentation/hwmon/pc87360.rst
diff --git a/Documentation/hwmon/pc87427 b/Documentation/hwmon/pc87427.rst
similarity index 100%
rename from Documentation/hwmon/pc87427
rename to Documentation/hwmon/pc87427.rst
diff --git a/Documentation/hwmon/pcf8591 b/Documentation/hwmon/pcf8591.rst
similarity index 100%
rename from Documentation/hwmon/pcf8591
rename to Documentation/hwmon/pcf8591.rst
diff --git a/Documentation/hwmon/pmbus-core b/Documentation/hwmon/pmbus-core.rst
similarity index 100%
rename from Documentation/hwmon/pmbus-core
rename to Documentation/hwmon/pmbus-core.rst
diff --git a/Documentation/hwmon/pmbus b/Documentation/hwmon/pmbus.rst
similarity index 100%
rename from Documentation/hwmon/pmbus
rename to Documentation/hwmon/pmbus.rst
diff --git a/Documentation/hwmon/powr1220 b/Documentation/hwmon/powr1220.rst
similarity index 100%
rename from Documentation/hwmon/powr1220
rename to Documentation/hwmon/powr1220.rst
diff --git a/Documentation/hwmon/pwm-fan b/Documentation/hwmon/pwm-fan.rst
similarity index 100%
rename from Documentation/hwmon/pwm-fan
rename to Documentation/hwmon/pwm-fan.rst
diff --git a/Documentation/hwmon/raspberrypi-hwmon b/Documentation/hwmon/raspberrypi-hwmon.rst
similarity index 100%
rename from Documentation/hwmon/raspberrypi-hwmon
rename to Documentation/hwmon/raspberrypi-hwmon.rst
diff --git a/Documentation/hwmon/sch5627 b/Documentation/hwmon/sch5627.rst
similarity index 100%
rename from Documentation/hwmon/sch5627
rename to Documentation/hwmon/sch5627.rst
diff --git a/Documentation/hwmon/sch5636 b/Documentation/hwmon/sch5636.rst
similarity index 100%
rename from Documentation/hwmon/sch5636
rename to Documentation/hwmon/sch5636.rst
diff --git a/Documentation/hwmon/scpi-hwmon b/Documentation/hwmon/scpi-hwmon.rst
similarity index 100%
rename from Documentation/hwmon/scpi-hwmon
rename to Documentation/hwmon/scpi-hwmon.rst
diff --git a/Documentation/hwmon/sht15 b/Documentation/hwmon/sht15.rst
similarity index 100%
rename from Documentation/hwmon/sht15
rename to Documentation/hwmon/sht15.rst
diff --git a/Documentation/hwmon/sht21 b/Documentation/hwmon/sht21.rst
similarity index 100%
rename from Documentation/hwmon/sht21
rename to Documentation/hwmon/sht21.rst
diff --git a/Documentation/hwmon/sht3x b/Documentation/hwmon/sht3x.rst
similarity index 100%
rename from Documentation/hwmon/sht3x
rename to Documentation/hwmon/sht3x.rst
diff --git a/Documentation/hwmon/shtc1 b/Documentation/hwmon/shtc1.rst
similarity index 100%
rename from Documentation/hwmon/shtc1
rename to Documentation/hwmon/shtc1.rst
diff --git a/Documentation/hwmon/sis5595 b/Documentation/hwmon/sis5595.rst
similarity index 100%
rename from Documentation/hwmon/sis5595
rename to Documentation/hwmon/sis5595.rst
diff --git a/Documentation/hwmon/smm665 b/Documentation/hwmon/smm665.rst
similarity index 100%
rename from Documentation/hwmon/smm665
rename to Documentation/hwmon/smm665.rst
diff --git a/Documentation/hwmon/smsc47b397 b/Documentation/hwmon/smsc47b397.rst
similarity index 100%
rename from Documentation/hwmon/smsc47b397
rename to Documentation/hwmon/smsc47b397.rst
diff --git a/Documentation/hwmon/smsc47m1 b/Documentation/hwmon/smsc47m1.rst
similarity index 100%
rename from Documentation/hwmon/smsc47m1
rename to Documentation/hwmon/smsc47m1.rst
diff --git a/Documentation/hwmon/smsc47m192 b/Documentation/hwmon/smsc47m192.rst
similarity index 100%
rename from Documentation/hwmon/smsc47m192
rename to Documentation/hwmon/smsc47m192.rst
diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches.rst
similarity index 99%
rename from Documentation/hwmon/submitting-patches
rename to Documentation/hwmon/submitting-patches.rst
index 12540b7d9b50..6120db7556aa 100644
--- a/Documentation/hwmon/submitting-patches
+++ b/Documentation/hwmon/submitting-patches.rst
@@ -134,7 +134,7 @@ increase the chances of your change being accepted.
   non-standard attributes, or you believe you do, discuss it on the mailing list
   first. Either case, provide a detailed explanation why you need the
   non-standard attribute(s).
-  Standard attributes are specified in Documentation/hwmon/sysfs-interface.
+  Standard attributes are specified in Documentation/hwmon/sysfs-interface.rst.
 
 * When deciding which sysfs attributes to support, look at the chip's
   capabilities. While we do not expect your driver to support everything the
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface.rst
similarity index 100%
rename from Documentation/hwmon/sysfs-interface
rename to Documentation/hwmon/sysfs-interface.rst
diff --git a/Documentation/hwmon/tc654 b/Documentation/hwmon/tc654.rst
similarity index 100%
rename from Documentation/hwmon/tc654
rename to Documentation/hwmon/tc654.rst
diff --git a/Documentation/hwmon/tc74 b/Documentation/hwmon/tc74.rst
similarity index 100%
rename from Documentation/hwmon/tc74
rename to Documentation/hwmon/tc74.rst
diff --git a/Documentation/hwmon/thmc50 b/Documentation/hwmon/thmc50.rst
similarity index 100%
rename from Documentation/hwmon/thmc50
rename to Documentation/hwmon/thmc50.rst
diff --git a/Documentation/hwmon/tmp102 b/Documentation/hwmon/tmp102.rst
similarity index 93%
rename from Documentation/hwmon/tmp102
rename to Documentation/hwmon/tmp102.rst
index 5e34821df4ab..b1f585531a88 100644
--- a/Documentation/hwmon/tmp102
+++ b/Documentation/hwmon/tmp102.rst
@@ -28,4 +28,4 @@ The TMP102 has a programmable update rate that can select between 8, 4, 1, and
 0.5 Hz. (Currently the driver only supports the default of 4 Hz).
 
 The driver provides the common sysfs-interface for temperatures (see
-Documentation/hwmon/sysfs-interface under Temperatures).
+Documentation/hwmon/sysfs-interface.rst under Temperatures).
diff --git a/Documentation/hwmon/tmp103 b/Documentation/hwmon/tmp103.rst
similarity index 92%
rename from Documentation/hwmon/tmp103
rename to Documentation/hwmon/tmp103.rst
index 7682a795e38c..15d25806d585 100644
--- a/Documentation/hwmon/tmp103
+++ b/Documentation/hwmon/tmp103.rst
@@ -27,7 +27,7 @@ Resolution: 8 Bits
 Accuracy: ?1?C Typ (?10?C to +100?C)
 
 The driver provides the common sysfs-interface for temperatures (see
-Documentation/hwmon/sysfs-interface under Temperatures).
+Documentation/hwmon/sysfs-interface.rst under Temperatures).
 
 Please refer how to instantiate this driver:
 Documentation/i2c/instantiating-devices
diff --git a/Documentation/hwmon/tmp108 b/Documentation/hwmon/tmp108.rst
similarity index 95%
rename from Documentation/hwmon/tmp108
rename to Documentation/hwmon/tmp108.rst
index 7e08b7ef1e2f..5f4266a16cb2 100644
--- a/Documentation/hwmon/tmp108
+++ b/Documentation/hwmon/tmp108.rst
@@ -38,4 +38,4 @@ and then the device is shut down automatically. (This driver only supports
 continuous mode.)
 
 The driver provides the common sysfs-interface for temperatures (see
-Documentation/hwmon/sysfs-interface under Temperatures).
+Documentation/hwmon/sysfs-interface.rst under Temperatures).
diff --git a/Documentation/hwmon/tmp401 b/Documentation/hwmon/tmp401.rst
similarity index 97%
rename from Documentation/hwmon/tmp401
rename to Documentation/hwmon/tmp401.rst
index bd865bbdb38d..6a05a0719bc7 100644
--- a/Documentation/hwmon/tmp401
+++ b/Documentation/hwmon/tmp401.rst
@@ -68,7 +68,7 @@ supported by the driver so far, so using the default resolution of 0.5
 degree).
 
 The driver provides the common sysfs-interface for temperatures (see
-Documentation/hwmon/sysfs-interface under Temperatures).
+Documentation/hwmon/sysfs-interface.rst under Temperatures).
 
 The TMP411 and TMP431 chips are compatible with TMP401. TMP411 provides
 some additional features.
diff --git a/Documentation/hwmon/tmp421 b/Documentation/hwmon/tmp421.rst
similarity index 100%
rename from Documentation/hwmon/tmp421
rename to Documentation/hwmon/tmp421.rst
diff --git a/Documentation/hwmon/tps40422 b/Documentation/hwmon/tps40422.rst
similarity index 96%
rename from Documentation/hwmon/tps40422
rename to Documentation/hwmon/tps40422.rst
index 359751eb5ed4..b691e30479dd 100644
--- a/Documentation/hwmon/tps40422
+++ b/Documentation/hwmon/tps40422.rst
@@ -21,7 +21,7 @@ This driver supports TI TPS40422 Dual-Output or Two-Phase Synchronous Buck
 Controller with PMBus
 
 The driver is a client driver to the core PMBus driver.
-Please see Documentation/hwmon/pmbus for details on PMBus client drivers.
+Please see Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/twl4030-madc-hwmon b/Documentation/hwmon/twl4030-madc-hwmon.rst
similarity index 100%
rename from Documentation/hwmon/twl4030-madc-hwmon
rename to Documentation/hwmon/twl4030-madc-hwmon.rst
diff --git a/Documentation/hwmon/ucd9000 b/Documentation/hwmon/ucd9000.rst
similarity index 97%
rename from Documentation/hwmon/ucd9000
rename to Documentation/hwmon/ucd9000.rst
index d69061b7312c..ebc4f2b3bfea 100644
--- a/Documentation/hwmon/ucd9000
+++ b/Documentation/hwmon/ucd9000.rst
@@ -57,7 +57,7 @@ system-health monitor. The device integrates a 12-bit ADC for monitoring up to
 13 power-supply voltage, current, or temperature inputs.
 
 This driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
@@ -72,7 +72,7 @@ Platform data support
 ---------------------
 
 The driver supports standard PMBus driver platform data. Please see
-Documentation/hwmon/pmbus for details.
+Documentation/hwmon/pmbus.rst for details.
 
 
 Sysfs entries
diff --git a/Documentation/hwmon/ucd9200 b/Documentation/hwmon/ucd9200.rst
similarity index 97%
rename from Documentation/hwmon/ucd9200
rename to Documentation/hwmon/ucd9200.rst
index 44eda4a579b6..b819dfd75f71 100644
--- a/Documentation/hwmon/ucd9200
+++ b/Documentation/hwmon/ucd9200.rst
@@ -33,7 +33,7 @@ dedicated circuitry for DC/DC loop management with flash memory and a serial
 interface to support configuration, monitoring and management.
 
 This driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
@@ -48,7 +48,7 @@ Platform data support
 ---------------------
 
 The driver supports standard PMBus driver platform data. Please see
-Documentation/hwmon/pmbus for details.
+Documentation/hwmon/pmbus.rst for details.
 
 
 Sysfs entries
diff --git a/Documentation/hwmon/userspace-tools b/Documentation/hwmon/userspace-tools.rst
similarity index 100%
rename from Documentation/hwmon/userspace-tools
rename to Documentation/hwmon/userspace-tools.rst
diff --git a/Documentation/hwmon/vexpress b/Documentation/hwmon/vexpress.rst
similarity index 100%
rename from Documentation/hwmon/vexpress
rename to Documentation/hwmon/vexpress.rst
diff --git a/Documentation/hwmon/via686a b/Documentation/hwmon/via686a.rst
similarity index 100%
rename from Documentation/hwmon/via686a
rename to Documentation/hwmon/via686a.rst
diff --git a/Documentation/hwmon/vt1211 b/Documentation/hwmon/vt1211.rst
similarity index 100%
rename from Documentation/hwmon/vt1211
rename to Documentation/hwmon/vt1211.rst
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf.rst
similarity index 100%
rename from Documentation/hwmon/w83627ehf
rename to Documentation/hwmon/w83627ehf.rst
diff --git a/Documentation/hwmon/w83627hf b/Documentation/hwmon/w83627hf.rst
similarity index 100%
rename from Documentation/hwmon/w83627hf
rename to Documentation/hwmon/w83627hf.rst
diff --git a/Documentation/hwmon/w83773g b/Documentation/hwmon/w83773g.rst
similarity index 100%
rename from Documentation/hwmon/w83773g
rename to Documentation/hwmon/w83773g.rst
diff --git a/Documentation/hwmon/w83781d b/Documentation/hwmon/w83781d.rst
similarity index 100%
rename from Documentation/hwmon/w83781d
rename to Documentation/hwmon/w83781d.rst
diff --git a/Documentation/hwmon/w83791d b/Documentation/hwmon/w83791d.rst
similarity index 99%
rename from Documentation/hwmon/w83791d
rename to Documentation/hwmon/w83791d.rst
index a91f9e5fb0c6..3adaed39b157 100644
--- a/Documentation/hwmon/w83791d
+++ b/Documentation/hwmon/w83791d.rst
@@ -102,7 +102,7 @@ This file is used for both legacy and new code.
 
 The sysfs interface to the beep bitmask has migrated from the original legacy
 method of a single sysfs beep_mask file to a newer method using multiple
-`*_beep` files as described in `Documentation/hwmon/sysfs-interface`.
+`*_beep` files as described in `Documentation/hwmon/sysfs-interface.rst`.
 
 A similar change has occurred for the bitmap corresponding to the alarms. The
 original legacy method used a single sysfs alarms file containing a bitmap
diff --git a/Documentation/hwmon/w83792d b/Documentation/hwmon/w83792d.rst
similarity index 100%
rename from Documentation/hwmon/w83792d
rename to Documentation/hwmon/w83792d.rst
diff --git a/Documentation/hwmon/w83793 b/Documentation/hwmon/w83793.rst
similarity index 100%
rename from Documentation/hwmon/w83793
rename to Documentation/hwmon/w83793.rst
diff --git a/Documentation/hwmon/w83795 b/Documentation/hwmon/w83795.rst
similarity index 100%
rename from Documentation/hwmon/w83795
rename to Documentation/hwmon/w83795.rst
diff --git a/Documentation/hwmon/w83l785ts b/Documentation/hwmon/w83l785ts.rst
similarity index 100%
rename from Documentation/hwmon/w83l785ts
rename to Documentation/hwmon/w83l785ts.rst
diff --git a/Documentation/hwmon/w83l786ng b/Documentation/hwmon/w83l786ng.rst
similarity index 100%
rename from Documentation/hwmon/w83l786ng
rename to Documentation/hwmon/w83l786ng.rst
diff --git a/Documentation/hwmon/wm831x b/Documentation/hwmon/wm831x.rst
similarity index 100%
rename from Documentation/hwmon/wm831x
rename to Documentation/hwmon/wm831x.rst
diff --git a/Documentation/hwmon/wm8350 b/Documentation/hwmon/wm8350.rst
similarity index 100%
rename from Documentation/hwmon/wm8350
rename to Documentation/hwmon/wm8350.rst
diff --git a/Documentation/hwmon/xgene-hwmon b/Documentation/hwmon/xgene-hwmon.rst
similarity index 100%
rename from Documentation/hwmon/xgene-hwmon
rename to Documentation/hwmon/xgene-hwmon.rst
diff --git a/Documentation/hwmon/zl6100 b/Documentation/hwmon/zl6100.rst
similarity index 98%
rename from Documentation/hwmon/zl6100
rename to Documentation/hwmon/zl6100.rst
index 4029970bace4..41513bb7fe51 100644
--- a/Documentation/hwmon/zl6100
+++ b/Documentation/hwmon/zl6100.rst
@@ -113,7 +113,7 @@ This driver supports hardware monitoring for Intersil / Zilker Labs ZL6100 and
 compatible digital DC-DC controllers.
 
 The driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus and Documentation.hwmon/pmbus-core for details
+Documentation/hwmon/pmbus.rst and Documentation.hwmon/pmbus-core for details
 on PMBus client drivers.
 
 
diff --git a/Documentation/index.rst b/Documentation/index.rst
index 80a421cb935e..3a710dc24fc8 100644
--- a/Documentation/index.rst
+++ b/Documentation/index.rst
@@ -83,6 +83,7 @@ needed).
    media/index
    networking/index
    input/index
+   hwmon/index
    gpu/index
    security/index
    sound/index
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
index 911399730c1c..c3fa500df92c 100644
--- a/Documentation/thermal/sysfs-api.txt
+++ b/Documentation/thermal/sysfs-api.txt
@@ -316,7 +316,7 @@ ACPI thermal zones.
     |---temp[1-*]_input:	The current temperature of thermal zone [1-*]
     |---temp[1-*]_critical:	The critical trip point of thermal zone [1-*]
 
-Please read Documentation/hwmon/sysfs-interface for additional information.
+Please read Documentation/hwmon/sysfs-interface.rst for additional information.
 
 ***************************
 * Thermal zone attributes *
diff --git a/MAINTAINERS b/MAINTAINERS
index dc615cb76455..d258fb8e7e8e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -468,7 +468,7 @@ ADM1025 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/adm1025
+F:	Documentation/hwmon/adm1025.rst
 F:	drivers/hwmon/adm1025.c
 
 ADM1029 HARDWARE MONITOR DRIVER
@@ -520,7 +520,7 @@ ADS1015 HARDWARE MONITOR DRIVER
 M:	Dirk Eibach <eibach@gdsys.de>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/ads1015
+F:	Documentation/hwmon/ads1015.rst
 F:	drivers/hwmon/ads1015.c
 F:	include/linux/platform_data/ads1015.h
 
@@ -533,7 +533,7 @@ ADT7475 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/adt7475
+F:	Documentation/hwmon/adt7475.rst
 F:	drivers/hwmon/adt7475.c
 
 ADVANSYS SCSI DRIVER
@@ -764,7 +764,7 @@ AMD FAM15H PROCESSOR POWER MONITORING DRIVER
 M:	Huang Rui <ray.huang@amd.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Supported
-F:	Documentation/hwmon/fam15h_power
+F:	Documentation/hwmon/fam15h_power.rst
 F:	drivers/hwmon/fam15h_power.c
 
 AMD FCH GPIO DRIVER
@@ -2512,7 +2512,7 @@ ASC7621 HARDWARE MONITOR DRIVER
 M:	George Joseph <george.joseph@fairview5.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/asc7621
+F:	Documentation/hwmon/asc7621.rst
 F:	drivers/hwmon/asc7621.c
 
 ASPEED VIDEO ENGINE DRIVER
@@ -4043,7 +4043,7 @@ CORETEMP HARDWARE MONITORING DRIVER
 M:	Fenghua Yu <fenghua.yu@intel.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/coretemp
+F:	Documentation/hwmon/coretemp.rst
 F:	drivers/hwmon/coretemp.c
 
 COSA/SRP SYNC SERIAL DRIVER
@@ -4598,7 +4598,7 @@ DIALOG SEMICONDUCTOR DRIVERS
 M:	Support Opensource <support.opensource@diasemi.com>
 W:	http://www.dialog-semiconductor.com/products
 S:	Supported
-F:	Documentation/hwmon/da90??
+F:	Documentation/hwmon/da90??.rst
 F:	Documentation/devicetree/bindings/mfd/da90*.txt
 F:	Documentation/devicetree/bindings/input/da90??-onkey.txt
 F:	Documentation/devicetree/bindings/thermal/da90??-thermal.txt
@@ -4749,7 +4749,7 @@ DME1737 HARDWARE MONITOR DRIVER
 M:	Juerg Haefliger <juergh@gmail.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/dme1737
+F:	Documentation/hwmon/dme1737.rst
 F:	drivers/hwmon/dme1737.c
 
 DMI/SMBIOS SUPPORT
@@ -5935,7 +5935,7 @@ F71805F HARDWARE MONITORING DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/f71805f
+F:	Documentation/hwmon/f71805f.rst
 F:	drivers/hwmon/f71805f.c
 
 FADDR2LINE
@@ -7618,7 +7618,7 @@ INA209 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/ina209
+F:	Documentation/hwmon/ina209.rst
 F:	Documentation/devicetree/bindings/hwmon/ina2xx.txt
 F:	drivers/hwmon/ina209.c
 
@@ -7626,7 +7626,7 @@ INA2XX HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/ina2xx
+F:	Documentation/hwmon/ina2xx.rst
 F:	drivers/hwmon/ina2xx.c
 F:	include/linux/platform_data/ina2xx.h
 
@@ -8244,7 +8244,7 @@ IT87 HARDWARE MONITORING DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/it87
+F:	Documentation/hwmon/it87.rst
 F:	drivers/hwmon/it87.c
 
 IT913X MEDIA DRIVER
@@ -8288,7 +8288,7 @@ M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
 F:	drivers/hwmon/jc42.c
-F:	Documentation/hwmon/jc42
+F:	Documentation/hwmon/jc42.rst
 
 JFS FILESYSTEM
 M:	Dave Kleikamp <shaggy@kernel.org>
@@ -8336,14 +8336,14 @@ K10TEMP HARDWARE MONITORING DRIVER
 M:	Clemens Ladisch <clemens@ladisch.de>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/k10temp
+F:	Documentation/hwmon/k10temp.rst
 F:	drivers/hwmon/k10temp.c
 
 K8TEMP HARDWARE MONITORING DRIVER
 M:	Rudolf Marek <r.marek@assembler.cz>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/k8temp
+F:	Documentation/hwmon/k8temp.rst
 F:	drivers/hwmon/k8temp.c
 
 KASAN
@@ -9034,21 +9034,21 @@ LM78 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/lm78
+F:	Documentation/hwmon/lm78.rst
 F:	drivers/hwmon/lm78.c
 
 LM83 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/lm83
+F:	Documentation/hwmon/lm83.rst
 F:	drivers/hwmon/lm83.c
 
 LM90 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/lm90
+F:	Documentation/hwmon/lm90.rst
 F:	Documentation/devicetree/bindings/hwmon/lm90.txt
 F:	drivers/hwmon/lm90.c
 F:	include/dt-bindings/thermal/lm90.h
@@ -9057,7 +9057,7 @@ LM95234 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/lm95234
+F:	Documentation/hwmon/lm95234.rst
 F:	drivers/hwmon/lm95234.c
 
 LME2510 MEDIA DRIVER
@@ -9131,7 +9131,7 @@ LTC4261 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/ltc4261
+F:	Documentation/hwmon/ltc4261.rst
 F:	drivers/hwmon/ltc4261.c
 
 LTC4306 I2C MULTIPLEXER DRIVER
@@ -9362,7 +9362,7 @@ MAX16065 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/max16065
+F:	Documentation/hwmon/max16065.rst
 F:	drivers/hwmon/max16065.c
 
 MAX2175 SDR TUNER DRIVER
@@ -9378,14 +9378,14 @@ F:	include/uapi/linux/max2175.h
 MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
 L:	linux-hwmon at vger.kernel.org
 S:	Orphan
-F:	Documentation/hwmon/max6650
+F:	Documentation/hwmon/max6650.rst
 F:	drivers/hwmon/max6650.c
 
 MAX6697 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/max6697
+F:	Documentation/hwmon/max6697.rst
 F:	Documentation/devicetree/bindings/hwmon/max6697.txt
 F:	drivers/hwmon/max6697.c
 F:	include/linux/platform_data/max6697.h
@@ -10031,7 +10031,7 @@ F:	drivers/mfd/menf21bmc.c
 F:	drivers/watchdog/menf21bmc_wdt.c
 F:	drivers/leds/leds-menf21bmc.c
 F:	drivers/hwmon/menf21bmc_hwmon.c
-F:	Documentation/hwmon/menf21bmc
+F:	Documentation/hwmon/menf21bmc.rst
 
 MEN Z069 WATCHDOG DRIVER
 M:	Johannes Thumshirn <jth@kernel.org>
@@ -10659,7 +10659,7 @@ NCT6775 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/nct6775
+F:	Documentation/hwmon/nct6775.rst
 F:	drivers/hwmon/nct6775.c
 
 NET_FAILOVER MODULE
@@ -11753,7 +11753,7 @@ PC87360 HARDWARE MONITORING DRIVER
 M:	Jim Cromie <jim.cromie@gmail.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/pc87360
+F:	Documentation/hwmon/pc87360.rst
 F:	drivers/hwmon/pc87360.c
 
 PC8736x GPIO DRIVER
@@ -11765,7 +11765,7 @@ PC87427 HARDWARE MONITORING DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/pc87427
+F:	Documentation/hwmon/pc87427.rst
 F:	drivers/hwmon/pc87427.c
 
 PCA9532 LED DRIVER
@@ -12333,23 +12333,23 @@ S:	Maintained
 F:	Documentation/devicetree/bindings/hwmon/ibm,cffps1.txt
 F:	Documentation/devicetree/bindings/hwmon/max31785.txt
 F:	Documentation/devicetree/bindings/hwmon/ltc2978.txt
-F:	Documentation/hwmon/adm1275
-F:	Documentation/hwmon/ibm-cffps
-F:	Documentation/hwmon/ir35221
-F:	Documentation/hwmon/lm25066
-F:	Documentation/hwmon/ltc2978
-F:	Documentation/hwmon/ltc3815
-F:	Documentation/hwmon/max16064
-F:	Documentation/hwmon/max20751
-F:	Documentation/hwmon/max31785
-F:	Documentation/hwmon/max34440
-F:	Documentation/hwmon/max8688
-F:	Documentation/hwmon/pmbus
-F:	Documentation/hwmon/pmbus-core
-F:	Documentation/hwmon/tps40422
-F:	Documentation/hwmon/ucd9000
-F:	Documentation/hwmon/ucd9200
-F:	Documentation/hwmon/zl6100
+F:	Documentation/hwmon/adm1275.rst
+F:	Documentation/hwmon/ibm-cffps.rst
+F:	Documentation/hwmon/ir35221.rst
+F:	Documentation/hwmon/lm25066.rst
+F:	Documentation/hwmon/ltc2978.rst
+F:	Documentation/hwmon/ltc3815.rst
+F:	Documentation/hwmon/max16064.rst
+F:	Documentation/hwmon/max20751.rst
+F:	Documentation/hwmon/max31785.rst
+F:	Documentation/hwmon/max34440.rst
+F:	Documentation/hwmon/max8688.rst
+F:	Documentation/hwmon/pmbus.rst
+F:	Documentation/hwmon/pmbus-core.rst
+F:	Documentation/hwmon/tps40422.rst
+F:	Documentation/hwmon/ucd9000.rst
+F:	Documentation/hwmon/ucd9200.rst
+F:	Documentation/hwmon/zl6100.rst
 F:	drivers/hwmon/pmbus/
 F:	include/linux/pmbus.h
 
@@ -12613,7 +12613,7 @@ M:	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Supported
 F:	Documentation/devicetree/bindings/hwmon/pwm-fan.txt
-F:	Documentation/hwmon/pwm-fan
+F:	Documentation/hwmon/pwm-fan.rst
 F:	drivers/hwmon/pwm-fan.c
 
 PWM IR Transmitter
@@ -14278,21 +14278,21 @@ SMM665 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/smm665
+F:	Documentation/hwmon/smm665.rst
 F:	drivers/hwmon/smm665.c
 
 SMSC EMC2103 HARDWARE MONITOR DRIVER
 M:	Steve Glendinning <steve.glendinning@shawell.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/emc2103
+F:	Documentation/hwmon/emc2103.rst
 F:	drivers/hwmon/emc2103.c
 
 SMSC SCH5627 HARDWARE MONITOR DRIVER
 M:	Hans de Goede <hdegoede@redhat.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Supported
-F:	Documentation/hwmon/sch5627
+F:	Documentation/hwmon/sch5627.rst
 F:	drivers/hwmon/sch5627.c
 
 SMSC UFX6000 and UFX7000 USB to VGA DRIVER
@@ -14305,7 +14305,7 @@ SMSC47B397 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/smsc47b397
+F:	Documentation/hwmon/smsc47b397.rst
 F:	drivers/hwmon/smsc47b397.c
 
 SMSC911x ETHERNET DRIVER
@@ -15650,7 +15650,7 @@ TMP401 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/tmp401
+F:	Documentation/hwmon/tmp401.rst
 F:	drivers/hwmon/tmp401.c
 
 TMPFS (SHMEM FILESYSTEM)
@@ -16675,7 +16675,7 @@ VT1211 HARDWARE MONITOR DRIVER
 M:	Juerg Haefliger <juergh@gmail.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/vt1211
+F:	Documentation/hwmon/vt1211.rst
 F:	drivers/hwmon/vt1211.c
 
 VT8231 HARDWARE MONITOR DRIVER
@@ -16703,14 +16703,14 @@ W83791D HARDWARE MONITORING DRIVER
 M:	Marc Hulsman <m.hulsman@tudelft.nl>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/w83791d
+F:	Documentation/hwmon/w83791d.rst
 F:	drivers/hwmon/w83791d.c
 
 W83793 HARDWARE MONITORING DRIVER
 M:	Rudolf Marek <r.marek@assembler.cz>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/w83793
+F:	Documentation/hwmon/w83793.rst
 F:	drivers/hwmon/w83793.c
 
 W83795 HARDWARE MONITORING DRIVER
@@ -16819,7 +16819,7 @@ L:	patches at opensource.cirrus.com
 T:	git https://github.com/CirrusLogic/linux-drivers.git
 W:	https://github.com/CirrusLogic/linux-drivers/wiki
 S:	Supported
-F:	Documentation/hwmon/wm83??
+F:	Documentation/hwmon/wm83??.rst
 F:	Documentation/devicetree/bindings/extcon/extcon-arizona.txt
 F:	Documentation/devicetree/bindings/regulator/arizona-regulator.txt
 F:	Documentation/devicetree/bindings/mfd/arizona.txt
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 6f929bfa9fcd..74c6c95cb657 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -17,7 +17,7 @@ menuconfig HWMON
 
 	  To find out which specific driver(s) you need, use the
 	  sensors-detect script from the lm_sensors package.  Read
-	  <file:Documentation/hwmon/userspace-tools> for details.
+	  <file:Documentation/hwmon/userspace-tools.rst> for details.
 
 	  This support can also be built as a module. If so, the module
 	  will be called hwmon.
@@ -59,7 +59,7 @@ config SENSORS_ABITUGURU
 	  chip can be found on Abit uGuru featuring motherboards (most modern
 	  Abit motherboards from before end 2005). For more info and a list
 	  of which motherboards have which revision see
-	  Documentation/hwmon/abituguru
+	  Documentation/hwmon/abituguru.rst
 
 	  This driver can also be built as a module. If so, the module
 	  will be called abituguru.
@@ -73,7 +73,7 @@ config SENSORS_ABITUGURU3
 	  and their settings is supported. The third revision of the Abit
 	  uGuru chip can be found on recent Abit motherboards (since end
 	  2005). For more info and a list of which motherboards have which
-	  revision see Documentation/hwmon/abituguru3
+	  revision see Documentation/hwmon/abituguru3.rst
 
 	  This driver can also be built as a module. If so, the module
 	  will be called abituguru3.
@@ -643,7 +643,7 @@ config SENSORS_CORETEMP
 	help
 	  If you say yes here you get support for the temperature
 	  sensor inside your CPU. Most of the family 6 CPUs
-	  are supported. Check Documentation/hwmon/coretemp for details.
+	  are supported. Check Documentation/hwmon/coretemp.rst for details.
 
 config SENSORS_IT87
 	tristate "ITE IT87xx and compatibles"
diff --git a/drivers/hwmon/ads7828.c b/drivers/hwmon/ads7828.c
index 12c56d3783ed..545b635a104e 100644
--- a/drivers/hwmon/ads7828.c
+++ b/drivers/hwmon/ads7828.c
@@ -8,7 +8,7 @@
  *
  * ADS7830 support, by Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
  *
- * For further information, see the Documentation/hwmon/ads7828 file.
+ * For further information, see the Documentation/hwmon/ads7828.rst file.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/drivers/hwmon/max197.c b/drivers/hwmon/max197.c
index 3d9e210beedf..dd6a35219a18 100644
--- a/drivers/hwmon/max197.c
+++ b/drivers/hwmon/max197.c
@@ -8,7 +8,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
- * For further information, see the Documentation/hwmon/max197 file.
+ * For further information, see the Documentation/hwmon/max197.rst file.
  */
 
 #include <linux/kernel.h>
diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
index 39b41e35c2bf..7f4a63959730 100644
--- a/drivers/hwmon/sht15.c
+++ b/drivers/hwmon/sht15.c
@@ -10,7 +10,7 @@
  *
  * Copyright (c) 2007 Wouter Horre
  *
- * For further information, see the Documentation/hwmon/sht15 file.
+ * For further information, see the Documentation/hwmon/sht15.rst file.
  */
 
 #include <linux/interrupt.h>
diff --git a/include/linux/platform_data/ads7828.h b/include/linux/platform_data/ads7828.h
index 3245f45f9d77..a3370a007702 100644
--- a/include/linux/platform_data/ads7828.h
+++ b/include/linux/platform_data/ads7828.h
@@ -4,7 +4,7 @@
  * Copyright (c) 2012 Savoir-faire Linux Inc.
  *          Vivien Didelot <vivien.didelot@savoirfairelinux.com>
  *
- * For further information, see the Documentation/hwmon/ads7828 file.
+ * For further information, see the Documentation/hwmon/ads7828.rst file.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
diff --git a/include/linux/platform_data/ds620.h b/include/linux/platform_data/ds620.h
index 6ef58bb77e46..f0ce22a78bb8 100644
--- a/include/linux/platform_data/ds620.h
+++ b/include/linux/platform_data/ds620.h
@@ -14,7 +14,7 @@ struct ds620_platform_data {
 	 *  1 = PO_LOW
 	 *  2 = PO_HIGH
 	 *
-	 * (see Documentation/hwmon/ds620)
+	 * (see Documentation/hwmon/ds620.rst)
 	 */
 	int pomode;
 };
diff --git a/include/linux/platform_data/ina2xx.h b/include/linux/platform_data/ina2xx.h
index 9f0aa1b48c78..dde59fd3590f 100644
--- a/include/linux/platform_data/ina2xx.h
+++ b/include/linux/platform_data/ina2xx.h
@@ -7,7 +7,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
- * For further information, see the Documentation/hwmon/ina2xx file.
+ * For further information, see the Documentation/hwmon/ina2xx.rst file.
  */
 
 /**
diff --git a/include/linux/platform_data/max197.h b/include/linux/platform_data/max197.h
index 8da8f94ee15c..2bbd0919bc89 100644
--- a/include/linux/platform_data/max197.h
+++ b/include/linux/platform_data/max197.h
@@ -8,7 +8,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
- * For further information, see the Documentation/hwmon/max197 file.
+ * For further information, see the Documentation/hwmon/max197.rst file.
  */
 
 #ifndef _PDATA_MAX197_H
diff --git a/include/linux/platform_data/ntc_thermistor.h b/include/linux/platform_data/ntc_thermistor.h
index ee03d429742b..5fa115d3ea4b 100644
--- a/include/linux/platform_data/ntc_thermistor.h
+++ b/include/linux/platform_data/ntc_thermistor.h
@@ -42,7 +42,7 @@ struct ntc_thermistor_platform_data {
 	 * read_uV()
 	 *
 	 * How to setup pullup_ohm, pulldown_ohm, and connect is
-	 * described at Documentation/hwmon/ntc_thermistor
+	 * described at Documentation/hwmon/ntc_thermistor.rst
 	 *
 	 * pullup/down_ohm: 0 for infinite / not-connected
 	 *
-- 
2.20.1


^ permalink raw reply related

* [PATCH 21/21] docs: hwmon: Add an index file and rename docs to *.rst
From: Jonathan Neuschäfer @ 2019-04-10 15:24 UTC (permalink / raw)
  To: linux-aspeed
In-Reply-To: <5ac1fbc7f19192dcd30a184e62e3f7989a5437a4.1554893882.git.mchehab+samsung@kernel.org>

Hello,

On Wed, Apr 10, 2019 at 08:12:11AM -0300, Mauro Carvalho Chehab wrote:
> Now that all files were converted to ReST format, rename them
> and add an index.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> ---
[...]
> diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches.rst
> similarity index 99%
> rename from Documentation/hwmon/submitting-patches
> rename to Documentation/hwmon/submitting-patches.rst
> index 12540b7d9b50..6120db7556aa 100644
> --- a/Documentation/hwmon/submitting-patches
> +++ b/Documentation/hwmon/submitting-patches.rst

I'd additionally suggest:

diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches.rst
index f88221b46153..0000a86be4b9 100644
--- a/Documentation/hwmon/submitting-patches
+++ b/Documentation/hwmon/submitting-patches.rst
@@ -38,7 +38,7 @@ increase the chances of your change being accepted.
 2. Adding functionality to existing drivers
 -------------------------------------------
 
-* Make sure the documentation in Documentation/hwmon/<driver_name> is up to
+* Make sure the documentation in Documentation/hwmon/<driver_name>.rst is up to
   date.
 
 * Make sure the information in Kconfig is up to date.
@@ -60,7 +60,7 @@ increase the chances of your change being accepted.
 
 * Consider adding yourself to MAINTAINERS.
 
-* Document the driver in Documentation/hwmon/<driver_name>.
+* Document the driver in Documentation/hwmon/<driver_name>.rst.
 
 * Add the driver to Kconfig and Makefile in alphabetical order.
 

Thanks,
Jonathan Neusch?fer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linux-aspeed/attachments/20190410/8e2783fe/attachment-0001.sig>

^ permalink raw reply related

* [PATCH v2 00/21] Convert hwmon documentation to ReST
From: Mauro Carvalho Chehab @ 2019-04-10 19:22 UTC (permalink / raw)
  To: linux-aspeed

This series converts the contents of Documentation/hwmon to ReST
format.

PS.: I opted to group the conversion files per groups of maintainer
set, as, if I were to generate one patch per file, it would give around
160 patches.

I also added those patches to my development tree at:
	https://git.linuxtv.org/mchehab/experimental.git/log/?h=hwmon

If you want to see the results, they're at:
	https://www.infradead.org/~mchehab/hwmon/

Version 2:

- Fixed broken SOB lines;
- changed submitting-patches.rst to mention that drivers should be
  documented as Documentation/hwmon/<driver_name>.rst,
  as suggested by Jonathan Neusch?fer.

Mauro Carvalho Chehab (21):
  docs: hwmon: k10temp: convert to ReST format
  docs: hwmon: vexpress: convert to ReST format
  docs: hwmon: menf21bmc: convert to ReST format
  docs: hwmon: sch5627: convert to ReST format
  docs: hwmon: emc2103: convert to ReST format
  docs: hwmon: pc87360: convert to ReST format
  docs: hwmon: fam15h_power: convert to ReST format
  docs: hwmon: w83791d: convert to ReST format
  docs: hwmon: coretemp: convert to ReST format
  docs: hwmon: aspeed-pwm-tacho: convert to ReST format
  docs: hwmon: ibmpowernv: convert to ReST format
  docs: hwmon: asc7621: convert to ReST format
  docs: hwmon: ads1015: convert to ReST format
  docs: hwmon: dme1737, vt1211: convert to ReST format
  docs: hwmon: wm831x, wm8350: convert to ReST format
  docs: hwmon: da9052, da9055: convert to ReST format
  docs: hwmon: k8temp, w83793: convert to ReST format
  docs: hwmon: pmbus files: convert to ReST format
  docs: hwmon: misc files: convert to ReST format
  docs: hwmon: convert remaining files to ReST format
  docs: hwmon: Add an index file and rename docs to *.rst

 .../devicetree/bindings/hwmon/g762.txt        |   2 +-
 Documentation/hwmon/{ab8500 => ab8500.rst}    |  10 +-
 Documentation/hwmon/abituguru                 |  92 ---
 ...guru-datasheet => abituguru-datasheet.rst} | 160 ++--
 Documentation/hwmon/abituguru.rst             | 113 +++
 .../hwmon/{abituguru3 => abituguru3.rst}      |  36 +-
 Documentation/hwmon/{abx500 => abx500.rst}    |   8 +-
 ...{acpi_power_meter => acpi_power_meter.rst} |  25 +-
 Documentation/hwmon/{ad7314 => ad7314.rst}    |   9 +
 .../hwmon/{adc128d818 => adc128d818.rst}      |   7 +-
 Documentation/hwmon/{adm1021 => adm1021.rst}  |  44 +-
 Documentation/hwmon/{adm1025 => adm1025.rst}  |  13 +-
 Documentation/hwmon/{adm1026 => adm1026.rst}  |  24 +-
 Documentation/hwmon/{adm1031 => adm1031.rst}  |  16 +-
 Documentation/hwmon/{adm1275 => adm1275.rst}  |  30 +-
 Documentation/hwmon/{adm9240 => adm9240.rst}  |  50 +-
 Documentation/hwmon/{ads1015 => ads1015.rst}  |  72 +-
 Documentation/hwmon/{ads7828 => ads7828.rst}  |  29 +-
 Documentation/hwmon/{adt7410 => adt7410.rst}  |  49 +-
 Documentation/hwmon/{adt7411 => adt7411.rst}  |  20 +-
 Documentation/hwmon/{adt7462 => adt7462.rst}  |  10 +-
 Documentation/hwmon/{adt7470 => adt7470.rst}  |   8 +-
 Documentation/hwmon/{adt7475 => adt7475.rst}  |  38 +-
 Documentation/hwmon/{amc6821 => amc6821.rst}  |  19 +-
 Documentation/hwmon/{asb100 => asb100.rst}    |  50 +-
 Documentation/hwmon/{asc7621 => asc7621.rst}  | 146 ++--
 ...{aspeed-pwm-tacho => aspeed-pwm-tacho.rst} |   2 +
 .../hwmon/{coretemp => coretemp.rst}          |  46 +-
 Documentation/hwmon/{da9052 => da9052.rst}    |  40 +-
 Documentation/hwmon/{da9055 => da9055.rst}    |  20 +-
 Documentation/hwmon/{dme1737 => dme1737.rst}  |  88 ++-
 Documentation/hwmon/{ds1621 => ds1621.rst}    | 154 ++--
 Documentation/hwmon/{ds620 => ds620.rst}      |  12 +-
 Documentation/hwmon/{emc1403 => emc1403.rst}  |  33 +-
 Documentation/hwmon/{emc2103 => emc2103.rst}  |   6 +-
 .../hwmon/{emc6w201 => emc6w201.rst}          |   5 +
 Documentation/hwmon/{f71805f => f71805f.rst}  |  36 +-
 .../hwmon/{f71882fg => f71882fg.rst}          |  56 +-
 .../hwmon/{fam15h_power => fam15h_power.rst}  |  85 ++-
 .../hwmon/{ftsteutates => ftsteutates.rst}    |  14 +-
 Documentation/hwmon/{g760a => g760a.rst}      |   4 +
 Documentation/hwmon/{g762 => g762.rst}        |  67 +-
 Documentation/hwmon/{gl518sm => gl518sm.rst}  |  21 +-
 Documentation/hwmon/{hih6130 => hih6130.rst}  |  14 +-
 ...on-kernel-api.txt => hwmon-kernel-api.rst} | 298 ++++----
 .../hwmon/{ibm-cffps => ibm-cffps.rst}        |   3 +
 Documentation/hwmon/{ibmaem => ibmaem.rst}    |  10 +-
 .../hwmon/{ibmpowernv => ibmpowernv.rst}      |   3 +
 Documentation/hwmon/{ina209 => ina209.rst}    |  18 +-
 Documentation/hwmon/{ina2xx => ina2xx.rst}    |  41 +-
 Documentation/hwmon/{ina3221 => ina3221.rst}  |  17 +-
 Documentation/hwmon/index.rst                 | 179 +++++
 Documentation/hwmon/{ir35221 => ir35221.rst}  |  12 +-
 Documentation/hwmon/{it87 => it87.rst}        | 102 ++-
 Documentation/hwmon/{jc42 => jc42.rst}        |  55 +-
 Documentation/hwmon/{k10temp => k10temp.rst}  |  37 +-
 Documentation/hwmon/{k8temp => k8temp.rst}    |  17 +-
 .../hwmon/{lineage-pem => lineage-pem.rst}    |  16 +-
 Documentation/hwmon/{lm25066 => lm25066.rst}  |  32 +-
 Documentation/hwmon/{lm63 => lm63.rst}        |  24 +-
 Documentation/hwmon/{lm70 => lm70.rst}        |  13 +-
 Documentation/hwmon/{lm73 => lm73.rst}        |  16 +-
 Documentation/hwmon/{lm75 => lm75.rst}        |  96 ++-
 Documentation/hwmon/{lm77 => lm77.rst}        |   9 +-
 Documentation/hwmon/{lm78 => lm78.rst}        |  20 +-
 Documentation/hwmon/{lm80 => lm80.rst}        |  19 +-
 Documentation/hwmon/{lm83 => lm83.rst}        |  16 +-
 Documentation/hwmon/{lm85 => lm85.rst}        |  97 ++-
 Documentation/hwmon/{lm87 => lm87.rst}        |  23 +-
 Documentation/hwmon/{lm90 => lm90.rst}        | 174 ++++-
 Documentation/hwmon/{lm92 => lm92.rst}        |  17 +-
 Documentation/hwmon/{lm93 => lm93.rst}        | 157 ++--
 Documentation/hwmon/{lm95234 => lm95234.rst}  |  11 +-
 Documentation/hwmon/{lm95245 => lm95245.rst}  |  13 +-
 Documentation/hwmon/{ltc2945 => ltc2945.rst}  |  16 +-
 Documentation/hwmon/{ltc2978 => ltc2978.rst}  | 267 +++++--
 Documentation/hwmon/{ltc2990 => ltc2990.rst}  |  23 +-
 Documentation/hwmon/{ltc3815 => ltc3815.rst}  |  12 +-
 Documentation/hwmon/{ltc4151 => ltc4151.rst}  |  16 +-
 Documentation/hwmon/{ltc4215 => ltc4215.rst}  |  16 +-
 Documentation/hwmon/{ltc4245 => ltc4245.rst}  |  17 +-
 Documentation/hwmon/{ltc4260 => ltc4260.rst}  |  16 +-
 Documentation/hwmon/{ltc4261 => ltc4261.rst}  |  16 +-
 .../hwmon/{max16064 => max16064.rst}          |  17 +-
 .../hwmon/{max16065 => max16065.rst}          |  24 +-
 Documentation/hwmon/{max1619 => max1619.rst}  |  11 +-
 Documentation/hwmon/{max1668 => max1668.rst}  |  14 +-
 Documentation/hwmon/{max197 => max197.rst}    |  36 +-
 .../hwmon/{max20751 => max20751.rst}          |   9 +-
 .../hwmon/{max31722 => max31722.rst}          |  12 +
 .../hwmon/{max31785 => max31785.rst}          |   6 +
 .../hwmon/{max31790 => max31790.rst}          |   6 +
 .../hwmon/{max34440 => max34440.rst}          |  90 ++-
 Documentation/hwmon/{max6639 => max6639.rst}  |  16 +-
 Documentation/hwmon/{max6642 => max6642.rst}  |  10 +-
 Documentation/hwmon/{max6650 => max6650.rst}  |  16 +-
 Documentation/hwmon/{max6697 => max6697.rst}  |  33 +
 Documentation/hwmon/{max8688 => max8688.rst}  |  20 +-
 .../hwmon/{mc13783-adc => mc13783-adc.rst}    |  27 +-
 Documentation/hwmon/{mcp3021 => mcp3021.rst}  |  15 +-
 .../hwmon/{menf21bmc => menf21bmc.rst}        |   5 +
 .../hwmon/{mlxreg-fan => mlxreg-fan.rst}      |  60 +-
 Documentation/hwmon/{nct6683 => nct6683.rst}  |  11 +-
 Documentation/hwmon/{nct6775 => nct6775.rst}  | 114 ++-
 Documentation/hwmon/{nct7802 => nct7802.rst}  |  11 +-
 Documentation/hwmon/{nct7904 => nct7904.rst}  |   9 +-
 .../{npcm750-pwm-fan => npcm750-pwm-fan.rst}  |   4 +
 Documentation/hwmon/{nsa320 => nsa320.rst}    |  15 +-
 .../{ntc_thermistor => ntc_thermistor.rst}    | 123 ++--
 Documentation/hwmon/{occ => occ.rst}          |  93 ++-
 Documentation/hwmon/{pc87360 => pc87360.rst}  |  38 +-
 Documentation/hwmon/{pc87427 => pc87427.rst}  |   4 +
 Documentation/hwmon/{pcf8591 => pcf8591.rst}  |  52 +-
 .../hwmon/{pmbus-core => pmbus-core.rst}      | 173 +++--
 Documentation/hwmon/{pmbus => pmbus.rst}      |  90 ++-
 .../hwmon/{powr1220 => powr1220.rst}          |  12 +-
 Documentation/hwmon/{pwm-fan => pwm-fan.rst}  |   0
 ...aspberrypi-hwmon => raspberrypi-hwmon.rst} |   3 +
 Documentation/hwmon/{sch5627 => sch5627.rst}  |   4 +
 Documentation/hwmon/{sch5636 => sch5636.rst}  |   3 +
 .../hwmon/{scpi-hwmon => scpi-hwmon.rst}      |   7 +-
 Documentation/hwmon/{sht15 => sht15.rst}      |  28 +-
 Documentation/hwmon/{sht21 => sht21.rst}      |  24 +-
 Documentation/hwmon/{sht3x => sht3x.rst}      |  42 +-
 Documentation/hwmon/{shtc1 => shtc1.rst}      |  19 +-
 Documentation/hwmon/{sis5595 => sis5595.rst}  |  40 +-
 Documentation/hwmon/{smm665 => smm665.rst}    |  42 +-
 .../hwmon/{smsc47b397 => smsc47b397.rst}      | 158 ++--
 .../hwmon/{smsc47m1 => smsc47m1.rst}          |  43 +-
 Documentation/hwmon/smsc47m192                | 103 ---
 Documentation/hwmon/smsc47m192.rst            | 116 +++
 ...mitting-patches => submitting-patches.rst} |  21 +-
 .../{sysfs-interface => sysfs-interface.rst}  | 696 ++++++++++++------
 Documentation/hwmon/{tc654 => tc654.rst}      |   9 +-
 Documentation/hwmon/{tc74 => tc74.rst}        |   3 +
 Documentation/hwmon/{thmc50 => thmc50.rst}    |  36 +-
 Documentation/hwmon/{tmp102 => tmp102.rst}    |   7 +-
 Documentation/hwmon/{tmp103 => tmp103.rst}    |   7 +-
 Documentation/hwmon/{tmp108 => tmp108.rst}    |   7 +-
 Documentation/hwmon/{tmp401 => tmp401.rst}    |  32 +-
 Documentation/hwmon/{tmp421 => tmp421.rst}    |  26 +-
 .../hwmon/{tps40422 => tps40422.rst}          |  25 +-
 ...4030-madc-hwmon => twl4030-madc-hwmon.rst} |   8 +-
 Documentation/hwmon/{ucd9000 => ucd9000.rst}  |  35 +-
 Documentation/hwmon/{ucd9200 => ucd9200.rst}  |  46 +-
 .../{userspace-tools => userspace-tools.rst}  |   3 +
 .../hwmon/{vexpress => vexpress.rst}          |  13 +-
 Documentation/hwmon/{via686a => via686a.rst}  |  30 +-
 Documentation/hwmon/{vt1211 => vt1211.rst}    |  84 ++-
 .../hwmon/{w83627ehf => w83627ehf.rst}        | 160 ++--
 .../hwmon/{w83627hf => w83627hf.rst}          |  65 +-
 Documentation/hwmon/{w83773g => w83773g.rst}  |  12 +-
 Documentation/hwmon/{w83781d => w83781d.rst}  | 330 +++++----
 Documentation/hwmon/{w83791d => w83791d.rst}  | 123 ++--
 Documentation/hwmon/{w83792d => w83792d.rst}  | 112 +--
 Documentation/hwmon/w83793                    | 106 ---
 Documentation/hwmon/w83793.rst                | 113 +++
 Documentation/hwmon/w83795                    | 127 ----
 Documentation/hwmon/w83795.rst                | 142 ++++
 .../hwmon/{w83l785ts => w83l785ts.rst}        |   9 +-
 .../hwmon/{w83l786ng => w83l786ng.rst}        |  42 +-
 Documentation/hwmon/{wm831x => wm831x.rst}    |   9 +-
 Documentation/hwmon/{wm8350 => wm8350.rst}    |  10 +-
 .../hwmon/{xgene-hwmon => xgene-hwmon.rst}    |  24 +-
 Documentation/hwmon/{zl6100 => zl6100.rst}    |  71 +-
 Documentation/index.rst                       |   1 +
 Documentation/thermal/sysfs-api.txt           |   2 +-
 MAINTAINERS                                   | 108 +--
 drivers/hwmon/Kconfig                         |   8 +-
 drivers/hwmon/ads7828.c                       |   2 +-
 drivers/hwmon/max197.c                        |   2 +-
 drivers/hwmon/sht15.c                         |   2 +-
 include/linux/platform_data/ads7828.h         |   2 +-
 include/linux/platform_data/ds620.h           |   2 +-
 include/linux/platform_data/ina2xx.h          |   2 +-
 include/linux/platform_data/max197.h          |   2 +-
 include/linux/platform_data/ntc_thermistor.h  |   2 +-
 177 files changed, 5604 insertions(+), 2609 deletions(-)
 rename Documentation/hwmon/{ab8500 => ab8500.rst} (69%)
 delete mode 100644 Documentation/hwmon/abituguru
 rename Documentation/hwmon/{abituguru-datasheet => abituguru-datasheet.rst} (69%)
 create mode 100644 Documentation/hwmon/abituguru.rst
 rename Documentation/hwmon/{abituguru3 => abituguru3.rst} (75%)
 rename Documentation/hwmon/{abx500 => abx500.rst} (89%)
 rename Documentation/hwmon/{acpi_power_meter => acpi_power_meter.rst} (65%)
 rename Documentation/hwmon/{ad7314 => ad7314.rst} (98%)
 rename Documentation/hwmon/{adc128d818 => adc128d818.rst} (95%)
 rename Documentation/hwmon/{adm1021 => adm1021.rst} (97%)
 rename Documentation/hwmon/{adm1025 => adm1025.rst} (96%)
 rename Documentation/hwmon/{adm1026 => adm1026.rst} (89%)
 rename Documentation/hwmon/{adm1031 => adm1031.rst} (80%)
 rename Documentation/hwmon/{adm1275 => adm1275.rst} (93%)
 rename Documentation/hwmon/{adm9240 => adm9240.rst} (85%)
 rename Documentation/hwmon/{ads1015 => ads1015.rst} (64%)
 rename Documentation/hwmon/{ads7828 => ads7828.rst} (68%)
 rename Documentation/hwmon/{adt7410 => adt7410.rst} (70%)
 rename Documentation/hwmon/{adt7411 => adt7411.rst} (67%)
 rename Documentation/hwmon/{adt7462 => adt7462.rst} (94%)
 rename Documentation/hwmon/{adt7470 => adt7470.rst} (95%)
 rename Documentation/hwmon/{adt7475 => adt7475.rst} (89%)
 rename Documentation/hwmon/{amc6821 => amc6821.rst} (90%)
 rename Documentation/hwmon/{asb100 => asb100.rst} (69%)
 rename Documentation/hwmon/{asc7621 => asc7621.rst} (80%)
 rename Documentation/hwmon/{aspeed-pwm-tacho => aspeed-pwm-tacho.rst} (79%)
 rename Documentation/hwmon/{coretemp => coretemp.rst} (78%)
 rename Documentation/hwmon/{da9052 => da9052.rst} (66%)
 rename Documentation/hwmon/{da9055 => da9055.rst} (80%)
 rename Documentation/hwmon/{dme1737 => dme1737.rst} (89%)
 rename Documentation/hwmon/{ds1621 => ds1621.rst} (68%)
 rename Documentation/hwmon/{ds620 => ds620.rst} (88%)
 rename Documentation/hwmon/{emc1403 => emc1403.rst} (83%)
 rename Documentation/hwmon/{emc2103 => emc2103.rst} (95%)
 rename Documentation/hwmon/{emc6w201 => emc6w201.rst} (99%)
 rename Documentation/hwmon/{f71805f => f71805f.rst} (88%)
 rename Documentation/hwmon/{f71882fg => f71882fg.rst} (97%)
 rename Documentation/hwmon/{fam15h_power => fam15h_power.rst} (63%)
 rename Documentation/hwmon/{ftsteutates => ftsteutates.rst} (65%)
 rename Documentation/hwmon/{g760a => g760a.rst} (99%)
 rename Documentation/hwmon/{g762 => g762.rst} (59%)
 rename Documentation/hwmon/{gl518sm => gl518sm.rst} (89%)
 rename Documentation/hwmon/{hih6130 => hih6130.rst} (85%)
 rename Documentation/hwmon/{hwmon-kernel-api.txt => hwmon-kernel-api.rst} (59%)
 rename Documentation/hwmon/{ibm-cffps => ibm-cffps.rst} (90%)
 rename Documentation/hwmon/{ibmaem => ibmaem.rst} (92%)
 rename Documentation/hwmon/{ibmpowernv => ibmpowernv.rst} (94%)
 rename Documentation/hwmon/{ina209 => ina209.rst} (90%)
 rename Documentation/hwmon/{ina2xx => ina2xx.rst} (81%)
 rename Documentation/hwmon/{ina3221 => ina3221.rst} (77%)
 create mode 100644 Documentation/hwmon/index.rst
 rename Documentation/hwmon/{ir35221 => ir35221.rst} (89%)
 rename Documentation/hwmon/{it87 => it87.rst} (92%)
 rename Documentation/hwmon/{jc42 => jc42.rst} (92%)
 rename Documentation/hwmon/{k10temp => k10temp.rst} (98%)
 rename Documentation/hwmon/{k8temp => k8temp.rst} (83%)
 rename Documentation/hwmon/{lineage-pem => lineage-pem.rst} (88%)
 rename Documentation/hwmon/{lm25066 => lm25066.rst} (91%)
 rename Documentation/hwmon/{lm63 => lm63.rst} (95%)
 rename Documentation/hwmon/{lm70 => lm70.rst} (96%)
 rename Documentation/hwmon/{lm73 => lm73.rst} (92%)
 rename Documentation/hwmon/{lm75 => lm75.rst} (80%)
 rename Documentation/hwmon/{lm77 => lm77.rst} (97%)
 rename Documentation/hwmon/{lm78 => lm78.rst} (95%)
 rename Documentation/hwmon/{lm80 => lm80.rst} (94%)
 rename Documentation/hwmon/{lm83 => lm83.rst} (95%)
 rename Documentation/hwmon/{lm85 => lm85.rst} (86%)
 rename Documentation/hwmon/{lm87 => lm87.rst} (89%)
 rename Documentation/hwmon/{lm90 => lm90.rst} (85%)
 rename Documentation/hwmon/{lm92 => lm92.rst} (90%)
 rename Documentation/hwmon/{lm93 => lm93.rst} (80%)
 rename Documentation/hwmon/{lm95234 => lm95234.rst} (94%)
 rename Documentation/hwmon/{lm95245 => lm95245.rst} (91%)
 rename Documentation/hwmon/{ltc2945 => ltc2945.rst} (89%)
 rename Documentation/hwmon/{ltc2978 => ltc2978.rst} (58%)
 rename Documentation/hwmon/{ltc2990 => ltc2990.rst} (76%)
 rename Documentation/hwmon/{ltc3815 => ltc3815.rst} (83%)
 rename Documentation/hwmon/{ltc4151 => ltc4151.rst} (80%)
 rename Documentation/hwmon/{ltc4215 => ltc4215.rst} (78%)
 rename Documentation/hwmon/{ltc4245 => ltc4245.rst} (89%)
 rename Documentation/hwmon/{ltc4260 => ltc4260.rst} (85%)
 rename Documentation/hwmon/{ltc4261 => ltc4261.rst} (88%)
 rename Documentation/hwmon/{max16064 => max16064.rst} (88%)
 rename Documentation/hwmon/{max16065 => max16065.rst} (95%)
 rename Documentation/hwmon/{max1619 => max1619.rst} (82%)
 rename Documentation/hwmon/{max1668 => max1668.rst} (85%)
 rename Documentation/hwmon/{max197 => max197.rst} (59%)
 rename Documentation/hwmon/{max20751 => max20751.rst} (89%)
 rename Documentation/hwmon/{max31722 => max31722.rst} (83%)
 rename Documentation/hwmon/{max31785 => max31785.rst} (92%)
 rename Documentation/hwmon/{max31790 => max31790.rst} (88%)
 rename Documentation/hwmon/{max34440 => max34440.rst} (77%)
 rename Documentation/hwmon/{max6639 => max6639.rst} (83%)
 rename Documentation/hwmon/{max6642 => max6642.rst} (82%)
 rename Documentation/hwmon/{max6650 => max6650.rst} (86%)
 rename Documentation/hwmon/{max6697 => max6697.rst} (91%)
 rename Documentation/hwmon/{max8688 => max8688.rst} (85%)
 rename Documentation/hwmon/{mc13783-adc => mc13783-adc.rst} (82%)
 rename Documentation/hwmon/{mcp3021 => mcp3021.rst} (90%)
 rename Documentation/hwmon/{menf21bmc => menf21bmc.rst} (93%)
 rename Documentation/hwmon/{mlxreg-fan => mlxreg-fan.rst} (53%)
 rename Documentation/hwmon/{nct6683 => nct6683.rst} (89%)
 rename Documentation/hwmon/{nct6775 => nct6775.rst} (86%)
 rename Documentation/hwmon/{nct7802 => nct7802.rst} (73%)
 rename Documentation/hwmon/{nct7904 => nct7904.rst} (88%)
 rename Documentation/hwmon/{npcm750-pwm-fan => npcm750-pwm-fan.rst} (79%)
 rename Documentation/hwmon/{nsa320 => nsa320.rst} (93%)
 rename Documentation/hwmon/{ntc_thermistor => ntc_thermistor.rst} (52%)
 rename Documentation/hwmon/{occ => occ.rst} (67%)
 rename Documentation/hwmon/{pc87360 => pc87360.rst} (88%)
 rename Documentation/hwmon/{pc87427 => pc87427.rst} (99%)
 rename Documentation/hwmon/{pcf8591 => pcf8591.rst} (62%)
 rename Documentation/hwmon/{pmbus-core => pmbus-core.rst} (68%)
 rename Documentation/hwmon/{pmbus => pmbus.rst} (88%)
 rename Documentation/hwmon/{powr1220 => powr1220.rst} (90%)
 rename Documentation/hwmon/{pwm-fan => pwm-fan.rst} (100%)
 rename Documentation/hwmon/{raspberrypi-hwmon => raspberrypi-hwmon.rst} (85%)
 rename Documentation/hwmon/{sch5627 => sch5627.rst} (99%)
 rename Documentation/hwmon/{sch5636 => sch5636.rst} (99%)
 rename Documentation/hwmon/{scpi-hwmon => scpi-hwmon.rst} (96%)
 rename Documentation/hwmon/{sht15 => sht15.rst} (74%)
 rename Documentation/hwmon/{sht21 => sht21.rst} (92%)
 rename Documentation/hwmon/{sht3x => sht3x.rst} (75%)
 rename Documentation/hwmon/{shtc1 => shtc1.rst} (94%)
 rename Documentation/hwmon/{sis5595 => sis5595.rst} (79%)
 rename Documentation/hwmon/{smm665 => smm665.rst} (92%)
 rename Documentation/hwmon/{smsc47b397 => smsc47b397.rst} (62%)
 rename Documentation/hwmon/{smsc47m1 => smsc47m1.rst} (77%)
 delete mode 100644 Documentation/hwmon/smsc47m192
 create mode 100644 Documentation/hwmon/smsc47m192.rst
 rename Documentation/hwmon/{submitting-patches => submitting-patches.rst} (93%)
 rename Documentation/hwmon/{sysfs-interface => sysfs-interface.rst} (70%)
 rename Documentation/hwmon/{tc654 => tc654.rst} (81%)
 rename Documentation/hwmon/{tc74 => tc74.rst} (99%)
 rename Documentation/hwmon/{thmc50 => thmc50.rst} (84%)
 rename Documentation/hwmon/{tmp102 => tmp102.rst} (92%)
 rename Documentation/hwmon/{tmp103 => tmp103.rst} (91%)
 rename Documentation/hwmon/{tmp108 => tmp108.rst} (95%)
 rename Documentation/hwmon/{tmp401 => tmp401.rst} (92%)
 rename Documentation/hwmon/{tmp421 => tmp421.rst} (96%)
 rename Documentation/hwmon/{tps40422 => tps40422.rst} (75%)
 rename Documentation/hwmon/{twl4030-madc-hwmon => twl4030-madc-hwmon.rst} (82%)
 rename Documentation/hwmon/{ucd9000 => ucd9000.rst} (87%)
 rename Documentation/hwmon/{ucd9200 => ucd9200.rst} (80%)
 rename Documentation/hwmon/{userspace-tools => userspace-tools.rst} (97%)
 rename Documentation/hwmon/{vexpress => vexpress.rst} (85%)
 rename Documentation/hwmon/{via686a => via686a.rst} (79%)
 rename Documentation/hwmon/{vt1211 => vt1211.rst} (73%)
 rename Documentation/hwmon/{w83627ehf => w83627ehf.rst} (64%)
 rename Documentation/hwmon/{w83627hf => w83627hf.rst} (73%)
 rename Documentation/hwmon/{w83773g => w83773g.rst} (91%)
 rename Documentation/hwmon/{w83781d => w83781d.rst} (66%)
 rename Documentation/hwmon/{w83791d => w83791d.rst} (59%)
 rename Documentation/hwmon/{w83792d => w83792d.rst} (78%)
 delete mode 100644 Documentation/hwmon/w83793
 create mode 100644 Documentation/hwmon/w83793.rst
 delete mode 100644 Documentation/hwmon/w83795
 create mode 100644 Documentation/hwmon/w83795.rst
 rename Documentation/hwmon/{w83l785ts => w83l785ts.rst} (91%)
 rename Documentation/hwmon/{w83l786ng => w83l786ng.rst} (64%)
 rename Documentation/hwmon/{wm831x => wm831x.rst} (86%)
 rename Documentation/hwmon/{wm8350 => wm8350.rst} (81%)
 rename Documentation/hwmon/{xgene-hwmon => xgene-hwmon.rst} (51%)
 rename Documentation/hwmon/{zl6100 => zl6100.rst} (83%)

-- 
2.20.1



^ permalink raw reply

* [PATCH v2 10/21] docs: hwmon: aspeed-pwm-tacho: convert to ReST format
From: Mauro Carvalho Chehab @ 2019-04-10 19:22 UTC (permalink / raw)
  To: linux-aspeed
In-Reply-To: <cover.1554923967.git.mchehab+samsung@kernel.org>

Convert aspeed-pwm-tacho to ReST format, in order to allow it to
be parsed by Sphinx.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 Documentation/hwmon/aspeed-pwm-tacho | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/hwmon/aspeed-pwm-tacho b/Documentation/hwmon/aspeed-pwm-tacho
index 7cfb34977460..6dcec845fbc7 100644
--- a/Documentation/hwmon/aspeed-pwm-tacho
+++ b/Documentation/hwmon/aspeed-pwm-tacho
@@ -15,8 +15,10 @@ controller supports up to 16 tachometer inputs.
 
 The driver provides the following sensor accesses in sysfs:
 
+=============== ======= =====================================================
 fanX_input	ro	provide current fan rotation value in RPM as reported
 			by the fan to the device.
 
 pwmX		rw	get or set PWM fan control value. This is an integer
 			value between 0(off) and 255(full speed).
+=============== ======= =====================================================
-- 
2.20.1


^ permalink raw reply related

* [PATCH v2 21/21] docs: hwmon: Add an index file and rename docs to *.rst
From: Mauro Carvalho Chehab @ 2019-04-10 19:22 UTC (permalink / raw)
  To: linux-aspeed
In-Reply-To: <cover.1554923967.git.mchehab+samsung@kernel.org>

Now that all files were converted to ReST format, rename them
and add an index.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
---
 .../devicetree/bindings/hwmon/g762.txt        |   2 +-
 Documentation/hwmon/{ab8500 => ab8500.rst}    |   2 +-
 ...guru-datasheet => abituguru-datasheet.rst} |   0
 .../hwmon/{abituguru => abituguru.rst}        |   0
 .../hwmon/{abituguru3 => abituguru3.rst}      |   0
 Documentation/hwmon/{abx500 => abx500.rst}    |   0
 ...{acpi_power_meter => acpi_power_meter.rst} |   2 +-
 Documentation/hwmon/{ad7314 => ad7314.rst}    |   0
 .../hwmon/{adc128d818 => adc128d818.rst}      |   0
 Documentation/hwmon/{adm1021 => adm1021.rst}  |   0
 Documentation/hwmon/{adm1025 => adm1025.rst}  |   0
 Documentation/hwmon/{adm1026 => adm1026.rst}  |   0
 Documentation/hwmon/{adm1031 => adm1031.rst}  |   0
 Documentation/hwmon/{adm1275 => adm1275.rst}  |   4 +-
 Documentation/hwmon/{adm9240 => adm9240.rst}  |   0
 Documentation/hwmon/{ads1015 => ads1015.rst}  |   0
 Documentation/hwmon/{ads7828 => ads7828.rst}  |   0
 Documentation/hwmon/{adt7410 => adt7410.rst}  |   0
 Documentation/hwmon/{adt7411 => adt7411.rst}  |   0
 Documentation/hwmon/{adt7462 => adt7462.rst}  |   0
 Documentation/hwmon/{adt7470 => adt7470.rst}  |   0
 Documentation/hwmon/{adt7475 => adt7475.rst}  |   0
 Documentation/hwmon/{amc6821 => amc6821.rst}  |   0
 Documentation/hwmon/{asb100 => asb100.rst}    |   0
 Documentation/hwmon/{asc7621 => asc7621.rst}  |   0
 ...{aspeed-pwm-tacho => aspeed-pwm-tacho.rst} |   0
 .../hwmon/{coretemp => coretemp.rst}          |   0
 Documentation/hwmon/{da9052 => da9052.rst}    |   0
 Documentation/hwmon/{da9055 => da9055.rst}    |   0
 Documentation/hwmon/{dme1737 => dme1737.rst}  |   0
 Documentation/hwmon/{ds1621 => ds1621.rst}    |   0
 Documentation/hwmon/{ds620 => ds620.rst}      |   0
 Documentation/hwmon/{emc1403 => emc1403.rst}  |   0
 Documentation/hwmon/{emc2103 => emc2103.rst}  |   0
 .../hwmon/{emc6w201 => emc6w201.rst}          |   0
 Documentation/hwmon/{f71805f => f71805f.rst}  |   0
 .../hwmon/{f71882fg => f71882fg.rst}          |   0
 .../hwmon/{fam15h_power => fam15h_power.rst}  |   0
 .../hwmon/{ftsteutates => ftsteutates.rst}    |   0
 Documentation/hwmon/{g760a => g760a.rst}      |   0
 Documentation/hwmon/{g762 => g762.rst}        |   2 +-
 Documentation/hwmon/{gl518sm => gl518sm.rst}  |   0
 Documentation/hwmon/{hih6130 => hih6130.rst}  |   0
 ...on-kernel-api.txt => hwmon-kernel-api.rst} |   4 +-
 .../hwmon/{ibm-cffps => ibm-cffps.rst}        |   0
 Documentation/hwmon/{ibmaem => ibmaem.rst}    |   0
 .../hwmon/{ibmpowernv => ibmpowernv.rst}      |   0
 Documentation/hwmon/{ina209 => ina209.rst}    |   0
 Documentation/hwmon/{ina2xx => ina2xx.rst}    |   2 +-
 Documentation/hwmon/{ina3221 => ina3221.rst}  |   0
 Documentation/hwmon/index.rst                 | 179 ++++++++++++++++++
 Documentation/hwmon/{ir35221 => ir35221.rst}  |   0
 Documentation/hwmon/{it87 => it87.rst}        |   0
 Documentation/hwmon/{jc42 => jc42.rst}        |   0
 Documentation/hwmon/{k10temp => k10temp.rst}  |   0
 Documentation/hwmon/{k8temp => k8temp.rst}    |   0
 .../hwmon/{lineage-pem => lineage-pem.rst}    |   0
 Documentation/hwmon/{lm25066 => lm25066.rst}  |   2 +-
 Documentation/hwmon/{lm63 => lm63.rst}        |   0
 Documentation/hwmon/{lm70 => lm70.rst}        |   0
 Documentation/hwmon/{lm73 => lm73.rst}        |   0
 Documentation/hwmon/{lm75 => lm75.rst}        |   0
 Documentation/hwmon/{lm77 => lm77.rst}        |   0
 Documentation/hwmon/{lm78 => lm78.rst}        |   0
 Documentation/hwmon/{lm80 => lm80.rst}        |   0
 Documentation/hwmon/{lm83 => lm83.rst}        |   0
 Documentation/hwmon/{lm85 => lm85.rst}        |   0
 Documentation/hwmon/{lm87 => lm87.rst}        |   0
 Documentation/hwmon/{lm90 => lm90.rst}        |   0
 Documentation/hwmon/{lm92 => lm92.rst}        |   0
 Documentation/hwmon/{lm93 => lm93.rst}        |   0
 Documentation/hwmon/{lm95234 => lm95234.rst}  |   0
 Documentation/hwmon/{lm95245 => lm95245.rst}  |   0
 Documentation/hwmon/{ltc2945 => ltc2945.rst}  |   0
 Documentation/hwmon/{ltc2978 => ltc2978.rst}  |   0
 Documentation/hwmon/{ltc2990 => ltc2990.rst}  |   0
 Documentation/hwmon/{ltc3815 => ltc3815.rst}  |   0
 Documentation/hwmon/{ltc4151 => ltc4151.rst}  |   0
 Documentation/hwmon/{ltc4215 => ltc4215.rst}  |   0
 Documentation/hwmon/{ltc4245 => ltc4245.rst}  |   0
 Documentation/hwmon/{ltc4260 => ltc4260.rst}  |   0
 Documentation/hwmon/{ltc4261 => ltc4261.rst}  |   0
 .../hwmon/{max16064 => max16064.rst}          |   2 +-
 .../hwmon/{max16065 => max16065.rst}          |   0
 Documentation/hwmon/{max1619 => max1619.rst}  |   0
 Documentation/hwmon/{max1668 => max1668.rst}  |   0
 Documentation/hwmon/{max197 => max197.rst}    |   0
 .../hwmon/{max20751 => max20751.rst}          |   2 +-
 .../hwmon/{max31722 => max31722.rst}          |   0
 .../hwmon/{max31785 => max31785.rst}          |   0
 .../hwmon/{max31790 => max31790.rst}          |   0
 .../hwmon/{max34440 => max34440.rst}          |   2 +-
 Documentation/hwmon/{max6639 => max6639.rst}  |   0
 Documentation/hwmon/{max6642 => max6642.rst}  |   0
 Documentation/hwmon/{max6650 => max6650.rst}  |   0
 Documentation/hwmon/{max6697 => max6697.rst}  |   0
 Documentation/hwmon/{max8688 => max8688.rst}  |   2 +-
 .../hwmon/{mc13783-adc => mc13783-adc.rst}    |   0
 Documentation/hwmon/{mcp3021 => mcp3021.rst}  |   0
 .../hwmon/{menf21bmc => menf21bmc.rst}        |   0
 .../hwmon/{mlxreg-fan => mlxreg-fan.rst}      |   0
 Documentation/hwmon/{nct6683 => nct6683.rst}  |   0
 Documentation/hwmon/{nct6775 => nct6775.rst}  |   0
 Documentation/hwmon/{nct7802 => nct7802.rst}  |   0
 Documentation/hwmon/{nct7904 => nct7904.rst}  |   0
 .../{npcm750-pwm-fan => npcm750-pwm-fan.rst}  |   0
 Documentation/hwmon/{nsa320 => nsa320.rst}    |   0
 .../{ntc_thermistor => ntc_thermistor.rst}    |   0
 Documentation/hwmon/{occ => occ.rst}          |   0
 Documentation/hwmon/{pc87360 => pc87360.rst}  |   0
 Documentation/hwmon/{pc87427 => pc87427.rst}  |   0
 Documentation/hwmon/{pcf8591 => pcf8591.rst}  |   0
 .../hwmon/{pmbus-core => pmbus-core.rst}      |   0
 Documentation/hwmon/{pmbus => pmbus.rst}      |   0
 .../hwmon/{powr1220 => powr1220.rst}          |   0
 Documentation/hwmon/{pwm-fan => pwm-fan.rst}  |   0
 ...aspberrypi-hwmon => raspberrypi-hwmon.rst} |   0
 Documentation/hwmon/{sch5627 => sch5627.rst}  |   0
 Documentation/hwmon/{sch5636 => sch5636.rst}  |   0
 .../hwmon/{scpi-hwmon => scpi-hwmon.rst}      |   0
 Documentation/hwmon/{sht15 => sht15.rst}      |   0
 Documentation/hwmon/{sht21 => sht21.rst}      |   0
 Documentation/hwmon/{sht3x => sht3x.rst}      |   0
 Documentation/hwmon/{shtc1 => shtc1.rst}      |   0
 Documentation/hwmon/{sis5595 => sis5595.rst}  |   0
 Documentation/hwmon/{smm665 => smm665.rst}    |   0
 .../hwmon/{smsc47b397 => smsc47b397.rst}      |   0
 .../hwmon/{smsc47m1 => smsc47m1.rst}          |   0
 .../hwmon/{smsc47m192 => smsc47m192.rst}      |   0
 ...mitting-patches => submitting-patches.rst} |   6 +-
 .../{sysfs-interface => sysfs-interface.rst}  |   0
 Documentation/hwmon/{tc654 => tc654.rst}      |   0
 Documentation/hwmon/{tc74 => tc74.rst}        |   0
 Documentation/hwmon/{thmc50 => thmc50.rst}    |   0
 Documentation/hwmon/{tmp102 => tmp102.rst}    |   2 +-
 Documentation/hwmon/{tmp103 => tmp103.rst}    |   2 +-
 Documentation/hwmon/{tmp108 => tmp108.rst}    |   2 +-
 Documentation/hwmon/{tmp401 => tmp401.rst}    |   2 +-
 Documentation/hwmon/{tmp421 => tmp421.rst}    |   0
 .../hwmon/{tps40422 => tps40422.rst}          |   2 +-
 ...4030-madc-hwmon => twl4030-madc-hwmon.rst} |   0
 Documentation/hwmon/{ucd9000 => ucd9000.rst}  |   4 +-
 Documentation/hwmon/{ucd9200 => ucd9200.rst}  |   4 +-
 .../{userspace-tools => userspace-tools.rst}  |   0
 .../hwmon/{vexpress => vexpress.rst}          |   0
 Documentation/hwmon/{via686a => via686a.rst}  |   0
 Documentation/hwmon/{vt1211 => vt1211.rst}    |   0
 .../hwmon/{w83627ehf => w83627ehf.rst}        |   0
 .../hwmon/{w83627hf => w83627hf.rst}          |   0
 Documentation/hwmon/{w83773g => w83773g.rst}  |   0
 Documentation/hwmon/{w83781d => w83781d.rst}  |   0
 Documentation/hwmon/{w83791d => w83791d.rst}  |   2 +-
 Documentation/hwmon/{w83792d => w83792d.rst}  |   0
 Documentation/hwmon/{w83793 => w83793.rst}    |   0
 Documentation/hwmon/{w83795 => w83795.rst}    |   0
 .../hwmon/{w83l785ts => w83l785ts.rst}        |   0
 .../hwmon/{w83l786ng => w83l786ng.rst}        |   0
 Documentation/hwmon/{wm831x => wm831x.rst}    |   0
 Documentation/hwmon/{wm8350 => wm8350.rst}    |   0
 .../hwmon/{xgene-hwmon => xgene-hwmon.rst}    |   0
 Documentation/hwmon/{zl6100 => zl6100.rst}    |   2 +-
 Documentation/index.rst                       |   1 +
 Documentation/thermal/sysfs-api.txt           |   2 +-
 MAINTAINERS                                   | 108 +++++------
 drivers/hwmon/Kconfig                         |   8 +-
 drivers/hwmon/ads7828.c                       |   2 +-
 drivers/hwmon/max197.c                        |   2 +-
 drivers/hwmon/sht15.c                         |   2 +-
 include/linux/platform_data/ads7828.h         |   2 +-
 include/linux/platform_data/ds620.h           |   2 +-
 include/linux/platform_data/ina2xx.h          |   2 +-
 include/linux/platform_data/max197.h          |   2 +-
 include/linux/platform_data/ntc_thermistor.h  |   2 +-
 173 files changed, 275 insertions(+), 95 deletions(-)
 rename Documentation/hwmon/{ab8500 => ab8500.rst} (86%)
 rename Documentation/hwmon/{abituguru-datasheet => abituguru-datasheet.rst} (100%)
 rename Documentation/hwmon/{abituguru => abituguru.rst} (100%)
 rename Documentation/hwmon/{abituguru3 => abituguru3.rst} (100%)
 rename Documentation/hwmon/{abx500 => abx500.rst} (100%)
 rename Documentation/hwmon/{acpi_power_meter => acpi_power_meter.rst} (97%)
 rename Documentation/hwmon/{ad7314 => ad7314.rst} (100%)
 rename Documentation/hwmon/{adc128d818 => adc128d818.rst} (100%)
 rename Documentation/hwmon/{adm1021 => adm1021.rst} (100%)
 rename Documentation/hwmon/{adm1025 => adm1025.rst} (100%)
 rename Documentation/hwmon/{adm1026 => adm1026.rst} (100%)
 rename Documentation/hwmon/{adm1031 => adm1031.rst} (100%)
 rename Documentation/hwmon/{adm1275 => adm1275.rst} (97%)
 rename Documentation/hwmon/{adm9240 => adm9240.rst} (100%)
 rename Documentation/hwmon/{ads1015 => ads1015.rst} (100%)
 rename Documentation/hwmon/{ads7828 => ads7828.rst} (100%)
 rename Documentation/hwmon/{adt7410 => adt7410.rst} (100%)
 rename Documentation/hwmon/{adt7411 => adt7411.rst} (100%)
 rename Documentation/hwmon/{adt7462 => adt7462.rst} (100%)
 rename Documentation/hwmon/{adt7470 => adt7470.rst} (100%)
 rename Documentation/hwmon/{adt7475 => adt7475.rst} (100%)
 rename Documentation/hwmon/{amc6821 => amc6821.rst} (100%)
 rename Documentation/hwmon/{asb100 => asb100.rst} (100%)
 rename Documentation/hwmon/{asc7621 => asc7621.rst} (100%)
 rename Documentation/hwmon/{aspeed-pwm-tacho => aspeed-pwm-tacho.rst} (100%)
 rename Documentation/hwmon/{coretemp => coretemp.rst} (100%)
 rename Documentation/hwmon/{da9052 => da9052.rst} (100%)
 rename Documentation/hwmon/{da9055 => da9055.rst} (100%)
 rename Documentation/hwmon/{dme1737 => dme1737.rst} (100%)
 rename Documentation/hwmon/{ds1621 => ds1621.rst} (100%)
 rename Documentation/hwmon/{ds620 => ds620.rst} (100%)
 rename Documentation/hwmon/{emc1403 => emc1403.rst} (100%)
 rename Documentation/hwmon/{emc2103 => emc2103.rst} (100%)
 rename Documentation/hwmon/{emc6w201 => emc6w201.rst} (100%)
 rename Documentation/hwmon/{f71805f => f71805f.rst} (100%)
 rename Documentation/hwmon/{f71882fg => f71882fg.rst} (100%)
 rename Documentation/hwmon/{fam15h_power => fam15h_power.rst} (100%)
 rename Documentation/hwmon/{ftsteutates => ftsteutates.rst} (100%)
 rename Documentation/hwmon/{g760a => g760a.rst} (100%)
 rename Documentation/hwmon/{g762 => g762.rst} (97%)
 rename Documentation/hwmon/{gl518sm => gl518sm.rst} (100%)
 rename Documentation/hwmon/{hih6130 => hih6130.rst} (100%)
 rename Documentation/hwmon/{hwmon-kernel-api.txt => hwmon-kernel-api.rst} (99%)
 rename Documentation/hwmon/{ibm-cffps => ibm-cffps.rst} (100%)
 rename Documentation/hwmon/{ibmaem => ibmaem.rst} (100%)
 rename Documentation/hwmon/{ibmpowernv => ibmpowernv.rst} (100%)
 rename Documentation/hwmon/{ina209 => ina209.rst} (100%)
 rename Documentation/hwmon/{ina2xx => ina2xx.rst} (97%)
 rename Documentation/hwmon/{ina3221 => ina3221.rst} (100%)
 create mode 100644 Documentation/hwmon/index.rst
 rename Documentation/hwmon/{ir35221 => ir35221.rst} (100%)
 rename Documentation/hwmon/{it87 => it87.rst} (100%)
 rename Documentation/hwmon/{jc42 => jc42.rst} (100%)
 rename Documentation/hwmon/{k10temp => k10temp.rst} (100%)
 rename Documentation/hwmon/{k8temp => k8temp.rst} (100%)
 rename Documentation/hwmon/{lineage-pem => lineage-pem.rst} (100%)
 rename Documentation/hwmon/{lm25066 => lm25066.rst} (97%)
 rename Documentation/hwmon/{lm63 => lm63.rst} (100%)
 rename Documentation/hwmon/{lm70 => lm70.rst} (100%)
 rename Documentation/hwmon/{lm73 => lm73.rst} (100%)
 rename Documentation/hwmon/{lm75 => lm75.rst} (100%)
 rename Documentation/hwmon/{lm77 => lm77.rst} (100%)
 rename Documentation/hwmon/{lm78 => lm78.rst} (100%)
 rename Documentation/hwmon/{lm80 => lm80.rst} (100%)
 rename Documentation/hwmon/{lm83 => lm83.rst} (100%)
 rename Documentation/hwmon/{lm85 => lm85.rst} (100%)
 rename Documentation/hwmon/{lm87 => lm87.rst} (100%)
 rename Documentation/hwmon/{lm90 => lm90.rst} (100%)
 rename Documentation/hwmon/{lm92 => lm92.rst} (100%)
 rename Documentation/hwmon/{lm93 => lm93.rst} (100%)
 rename Documentation/hwmon/{lm95234 => lm95234.rst} (100%)
 rename Documentation/hwmon/{lm95245 => lm95245.rst} (100%)
 rename Documentation/hwmon/{ltc2945 => ltc2945.rst} (100%)
 rename Documentation/hwmon/{ltc2978 => ltc2978.rst} (100%)
 rename Documentation/hwmon/{ltc2990 => ltc2990.rst} (100%)
 rename Documentation/hwmon/{ltc3815 => ltc3815.rst} (100%)
 rename Documentation/hwmon/{ltc4151 => ltc4151.rst} (100%)
 rename Documentation/hwmon/{ltc4215 => ltc4215.rst} (100%)
 rename Documentation/hwmon/{ltc4245 => ltc4245.rst} (100%)
 rename Documentation/hwmon/{ltc4260 => ltc4260.rst} (100%)
 rename Documentation/hwmon/{ltc4261 => ltc4261.rst} (100%)
 rename Documentation/hwmon/{max16064 => max16064.rst} (96%)
 rename Documentation/hwmon/{max16065 => max16065.rst} (100%)
 rename Documentation/hwmon/{max1619 => max1619.rst} (100%)
 rename Documentation/hwmon/{max1668 => max1668.rst} (100%)
 rename Documentation/hwmon/{max197 => max197.rst} (100%)
 rename Documentation/hwmon/{max20751 => max20751.rst} (96%)
 rename Documentation/hwmon/{max31722 => max31722.rst} (100%)
 rename Documentation/hwmon/{max31785 => max31785.rst} (100%)
 rename Documentation/hwmon/{max31790 => max31790.rst} (100%)
 rename Documentation/hwmon/{max34440 => max34440.rst} (98%)
 rename Documentation/hwmon/{max6639 => max6639.rst} (100%)
 rename Documentation/hwmon/{max6642 => max6642.rst} (100%)
 rename Documentation/hwmon/{max6650 => max6650.rst} (100%)
 rename Documentation/hwmon/{max6697 => max6697.rst} (100%)
 rename Documentation/hwmon/{max8688 => max8688.rst} (97%)
 rename Documentation/hwmon/{mc13783-adc => mc13783-adc.rst} (100%)
 rename Documentation/hwmon/{mcp3021 => mcp3021.rst} (100%)
 rename Documentation/hwmon/{menf21bmc => menf21bmc.rst} (100%)
 rename Documentation/hwmon/{mlxreg-fan => mlxreg-fan.rst} (100%)
 rename Documentation/hwmon/{nct6683 => nct6683.rst} (100%)
 rename Documentation/hwmon/{nct6775 => nct6775.rst} (100%)
 rename Documentation/hwmon/{nct7802 => nct7802.rst} (100%)
 rename Documentation/hwmon/{nct7904 => nct7904.rst} (100%)
 rename Documentation/hwmon/{npcm750-pwm-fan => npcm750-pwm-fan.rst} (100%)
 rename Documentation/hwmon/{nsa320 => nsa320.rst} (100%)
 rename Documentation/hwmon/{ntc_thermistor => ntc_thermistor.rst} (100%)
 rename Documentation/hwmon/{occ => occ.rst} (100%)
 rename Documentation/hwmon/{pc87360 => pc87360.rst} (100%)
 rename Documentation/hwmon/{pc87427 => pc87427.rst} (100%)
 rename Documentation/hwmon/{pcf8591 => pcf8591.rst} (100%)
 rename Documentation/hwmon/{pmbus-core => pmbus-core.rst} (100%)
 rename Documentation/hwmon/{pmbus => pmbus.rst} (100%)
 rename Documentation/hwmon/{powr1220 => powr1220.rst} (100%)
 rename Documentation/hwmon/{pwm-fan => pwm-fan.rst} (100%)
 rename Documentation/hwmon/{raspberrypi-hwmon => raspberrypi-hwmon.rst} (100%)
 rename Documentation/hwmon/{sch5627 => sch5627.rst} (100%)
 rename Documentation/hwmon/{sch5636 => sch5636.rst} (100%)
 rename Documentation/hwmon/{scpi-hwmon => scpi-hwmon.rst} (100%)
 rename Documentation/hwmon/{sht15 => sht15.rst} (100%)
 rename Documentation/hwmon/{sht21 => sht21.rst} (100%)
 rename Documentation/hwmon/{sht3x => sht3x.rst} (100%)
 rename Documentation/hwmon/{shtc1 => shtc1.rst} (100%)
 rename Documentation/hwmon/{sis5595 => sis5595.rst} (100%)
 rename Documentation/hwmon/{smm665 => smm665.rst} (100%)
 rename Documentation/hwmon/{smsc47b397 => smsc47b397.rst} (100%)
 rename Documentation/hwmon/{smsc47m1 => smsc47m1.rst} (100%)
 rename Documentation/hwmon/{smsc47m192 => smsc47m192.rst} (100%)
 rename Documentation/hwmon/{submitting-patches => submitting-patches.rst} (98%)
 rename Documentation/hwmon/{sysfs-interface => sysfs-interface.rst} (100%)
 rename Documentation/hwmon/{tc654 => tc654.rst} (100%)
 rename Documentation/hwmon/{tc74 => tc74.rst} (100%)
 rename Documentation/hwmon/{thmc50 => thmc50.rst} (100%)
 rename Documentation/hwmon/{tmp102 => tmp102.rst} (93%)
 rename Documentation/hwmon/{tmp103 => tmp103.rst} (92%)
 rename Documentation/hwmon/{tmp108 => tmp108.rst} (95%)
 rename Documentation/hwmon/{tmp401 => tmp401.rst} (97%)
 rename Documentation/hwmon/{tmp421 => tmp421.rst} (100%)
 rename Documentation/hwmon/{tps40422 => tps40422.rst} (96%)
 rename Documentation/hwmon/{twl4030-madc-hwmon => twl4030-madc-hwmon.rst} (100%)
 rename Documentation/hwmon/{ucd9000 => ucd9000.rst} (97%)
 rename Documentation/hwmon/{ucd9200 => ucd9200.rst} (97%)
 rename Documentation/hwmon/{userspace-tools => userspace-tools.rst} (100%)
 rename Documentation/hwmon/{vexpress => vexpress.rst} (100%)
 rename Documentation/hwmon/{via686a => via686a.rst} (100%)
 rename Documentation/hwmon/{vt1211 => vt1211.rst} (100%)
 rename Documentation/hwmon/{w83627ehf => w83627ehf.rst} (100%)
 rename Documentation/hwmon/{w83627hf => w83627hf.rst} (100%)
 rename Documentation/hwmon/{w83773g => w83773g.rst} (100%)
 rename Documentation/hwmon/{w83781d => w83781d.rst} (100%)
 rename Documentation/hwmon/{w83791d => w83791d.rst} (99%)
 rename Documentation/hwmon/{w83792d => w83792d.rst} (100%)
 rename Documentation/hwmon/{w83793 => w83793.rst} (100%)
 rename Documentation/hwmon/{w83795 => w83795.rst} (100%)
 rename Documentation/hwmon/{w83l785ts => w83l785ts.rst} (100%)
 rename Documentation/hwmon/{w83l786ng => w83l786ng.rst} (100%)
 rename Documentation/hwmon/{wm831x => wm831x.rst} (100%)
 rename Documentation/hwmon/{wm8350 => wm8350.rst} (100%)
 rename Documentation/hwmon/{xgene-hwmon => xgene-hwmon.rst} (100%)
 rename Documentation/hwmon/{zl6100 => zl6100.rst} (98%)

diff --git a/Documentation/devicetree/bindings/hwmon/g762.txt b/Documentation/devicetree/bindings/hwmon/g762.txt
index 25cc6d8ee575..6d154c4923de 100644
--- a/Documentation/devicetree/bindings/hwmon/g762.txt
+++ b/Documentation/devicetree/bindings/hwmon/g762.txt
@@ -21,7 +21,7 @@ If an optional property is not set in .dts file, then current value is kept
 unmodified (e.g. u-boot installed value).
 
 Additional information on operational parameters for the device is available
-in Documentation/hwmon/g762. A detailed datasheet for the device is available
+in Documentation/hwmon/g762.rst. A detailed datasheet for the device is available
 at http://natisbad.org/NAS/refs/GMT_EDS-762_763-080710-0.2.pdf.
 
 Example g762 node:
diff --git a/Documentation/hwmon/ab8500 b/Documentation/hwmon/ab8500.rst
similarity index 86%
rename from Documentation/hwmon/ab8500
rename to Documentation/hwmon/ab8500.rst
index d87c61151239..33f93a9cec04 100644
--- a/Documentation/hwmon/ab8500
+++ b/Documentation/hwmon/ab8500.rst
@@ -18,7 +18,7 @@ Authors:
 Description
 -----------
 
-See also Documentation/hwmon/abx500. This is the ST-Ericsson AB8500 specific
+See also Documentation/hwmon/abx500.rst. This is the ST-Ericsson AB8500 specific
 driver.
 
 Currently only the AB8500 internal sensor and one external sensor for battery
diff --git a/Documentation/hwmon/abituguru-datasheet b/Documentation/hwmon/abituguru-datasheet.rst
similarity index 100%
rename from Documentation/hwmon/abituguru-datasheet
rename to Documentation/hwmon/abituguru-datasheet.rst
diff --git a/Documentation/hwmon/abituguru b/Documentation/hwmon/abituguru.rst
similarity index 100%
rename from Documentation/hwmon/abituguru
rename to Documentation/hwmon/abituguru.rst
diff --git a/Documentation/hwmon/abituguru3 b/Documentation/hwmon/abituguru3.rst
similarity index 100%
rename from Documentation/hwmon/abituguru3
rename to Documentation/hwmon/abituguru3.rst
diff --git a/Documentation/hwmon/abx500 b/Documentation/hwmon/abx500.rst
similarity index 100%
rename from Documentation/hwmon/abx500
rename to Documentation/hwmon/abx500.rst
diff --git a/Documentation/hwmon/acpi_power_meter b/Documentation/hwmon/acpi_power_meter.rst
similarity index 97%
rename from Documentation/hwmon/acpi_power_meter
rename to Documentation/hwmon/acpi_power_meter.rst
index 7665ca6ba957..4a0941ade0ca 100644
--- a/Documentation/hwmon/acpi_power_meter
+++ b/Documentation/hwmon/acpi_power_meter.rst
@@ -21,7 +21,7 @@ the ACPI 4.0 spec (Chapter 10.4).  These devices have a simple set of
 features--a power meter that returns average power use over a configurable
 interval, an optional capping mechanism, and a couple of trip points.  The
 sysfs interface conforms with the specification outlined in the "Power" section
-of Documentation/hwmon/sysfs-interface.
+of Documentation/hwmon/sysfs-interface.rst.
 
 Special Features
 ----------------
diff --git a/Documentation/hwmon/ad7314 b/Documentation/hwmon/ad7314.rst
similarity index 100%
rename from Documentation/hwmon/ad7314
rename to Documentation/hwmon/ad7314.rst
diff --git a/Documentation/hwmon/adc128d818 b/Documentation/hwmon/adc128d818.rst
similarity index 100%
rename from Documentation/hwmon/adc128d818
rename to Documentation/hwmon/adc128d818.rst
diff --git a/Documentation/hwmon/adm1021 b/Documentation/hwmon/adm1021.rst
similarity index 100%
rename from Documentation/hwmon/adm1021
rename to Documentation/hwmon/adm1021.rst
diff --git a/Documentation/hwmon/adm1025 b/Documentation/hwmon/adm1025.rst
similarity index 100%
rename from Documentation/hwmon/adm1025
rename to Documentation/hwmon/adm1025.rst
diff --git a/Documentation/hwmon/adm1026 b/Documentation/hwmon/adm1026.rst
similarity index 100%
rename from Documentation/hwmon/adm1026
rename to Documentation/hwmon/adm1026.rst
diff --git a/Documentation/hwmon/adm1031 b/Documentation/hwmon/adm1031.rst
similarity index 100%
rename from Documentation/hwmon/adm1031
rename to Documentation/hwmon/adm1031.rst
diff --git a/Documentation/hwmon/adm1275 b/Documentation/hwmon/adm1275.rst
similarity index 97%
rename from Documentation/hwmon/adm1275
rename to Documentation/hwmon/adm1275.rst
index 5c5860011d6e..9a1913e5b4d9 100644
--- a/Documentation/hwmon/adm1275
+++ b/Documentation/hwmon/adm1275.rst
@@ -68,7 +68,7 @@ integrated 12 bit analog-to-digital converter (ADC), accessed using a
 PMBus interface.
 
 The driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
@@ -90,7 +90,7 @@ Platform data support
 ---------------------
 
 The driver supports standard PMBus driver platform data. Please see
-Documentation/hwmon/pmbus for details.
+Documentation/hwmon/pmbus.rst for details.
 
 
 Sysfs entries
diff --git a/Documentation/hwmon/adm9240 b/Documentation/hwmon/adm9240.rst
similarity index 100%
rename from Documentation/hwmon/adm9240
rename to Documentation/hwmon/adm9240.rst
diff --git a/Documentation/hwmon/ads1015 b/Documentation/hwmon/ads1015.rst
similarity index 100%
rename from Documentation/hwmon/ads1015
rename to Documentation/hwmon/ads1015.rst
diff --git a/Documentation/hwmon/ads7828 b/Documentation/hwmon/ads7828.rst
similarity index 100%
rename from Documentation/hwmon/ads7828
rename to Documentation/hwmon/ads7828.rst
diff --git a/Documentation/hwmon/adt7410 b/Documentation/hwmon/adt7410.rst
similarity index 100%
rename from Documentation/hwmon/adt7410
rename to Documentation/hwmon/adt7410.rst
diff --git a/Documentation/hwmon/adt7411 b/Documentation/hwmon/adt7411.rst
similarity index 100%
rename from Documentation/hwmon/adt7411
rename to Documentation/hwmon/adt7411.rst
diff --git a/Documentation/hwmon/adt7462 b/Documentation/hwmon/adt7462.rst
similarity index 100%
rename from Documentation/hwmon/adt7462
rename to Documentation/hwmon/adt7462.rst
diff --git a/Documentation/hwmon/adt7470 b/Documentation/hwmon/adt7470.rst
similarity index 100%
rename from Documentation/hwmon/adt7470
rename to Documentation/hwmon/adt7470.rst
diff --git a/Documentation/hwmon/adt7475 b/Documentation/hwmon/adt7475.rst
similarity index 100%
rename from Documentation/hwmon/adt7475
rename to Documentation/hwmon/adt7475.rst
diff --git a/Documentation/hwmon/amc6821 b/Documentation/hwmon/amc6821.rst
similarity index 100%
rename from Documentation/hwmon/amc6821
rename to Documentation/hwmon/amc6821.rst
diff --git a/Documentation/hwmon/asb100 b/Documentation/hwmon/asb100.rst
similarity index 100%
rename from Documentation/hwmon/asb100
rename to Documentation/hwmon/asb100.rst
diff --git a/Documentation/hwmon/asc7621 b/Documentation/hwmon/asc7621.rst
similarity index 100%
rename from Documentation/hwmon/asc7621
rename to Documentation/hwmon/asc7621.rst
diff --git a/Documentation/hwmon/aspeed-pwm-tacho b/Documentation/hwmon/aspeed-pwm-tacho.rst
similarity index 100%
rename from Documentation/hwmon/aspeed-pwm-tacho
rename to Documentation/hwmon/aspeed-pwm-tacho.rst
diff --git a/Documentation/hwmon/coretemp b/Documentation/hwmon/coretemp.rst
similarity index 100%
rename from Documentation/hwmon/coretemp
rename to Documentation/hwmon/coretemp.rst
diff --git a/Documentation/hwmon/da9052 b/Documentation/hwmon/da9052.rst
similarity index 100%
rename from Documentation/hwmon/da9052
rename to Documentation/hwmon/da9052.rst
diff --git a/Documentation/hwmon/da9055 b/Documentation/hwmon/da9055.rst
similarity index 100%
rename from Documentation/hwmon/da9055
rename to Documentation/hwmon/da9055.rst
diff --git a/Documentation/hwmon/dme1737 b/Documentation/hwmon/dme1737.rst
similarity index 100%
rename from Documentation/hwmon/dme1737
rename to Documentation/hwmon/dme1737.rst
diff --git a/Documentation/hwmon/ds1621 b/Documentation/hwmon/ds1621.rst
similarity index 100%
rename from Documentation/hwmon/ds1621
rename to Documentation/hwmon/ds1621.rst
diff --git a/Documentation/hwmon/ds620 b/Documentation/hwmon/ds620.rst
similarity index 100%
rename from Documentation/hwmon/ds620
rename to Documentation/hwmon/ds620.rst
diff --git a/Documentation/hwmon/emc1403 b/Documentation/hwmon/emc1403.rst
similarity index 100%
rename from Documentation/hwmon/emc1403
rename to Documentation/hwmon/emc1403.rst
diff --git a/Documentation/hwmon/emc2103 b/Documentation/hwmon/emc2103.rst
similarity index 100%
rename from Documentation/hwmon/emc2103
rename to Documentation/hwmon/emc2103.rst
diff --git a/Documentation/hwmon/emc6w201 b/Documentation/hwmon/emc6w201.rst
similarity index 100%
rename from Documentation/hwmon/emc6w201
rename to Documentation/hwmon/emc6w201.rst
diff --git a/Documentation/hwmon/f71805f b/Documentation/hwmon/f71805f.rst
similarity index 100%
rename from Documentation/hwmon/f71805f
rename to Documentation/hwmon/f71805f.rst
diff --git a/Documentation/hwmon/f71882fg b/Documentation/hwmon/f71882fg.rst
similarity index 100%
rename from Documentation/hwmon/f71882fg
rename to Documentation/hwmon/f71882fg.rst
diff --git a/Documentation/hwmon/fam15h_power b/Documentation/hwmon/fam15h_power.rst
similarity index 100%
rename from Documentation/hwmon/fam15h_power
rename to Documentation/hwmon/fam15h_power.rst
diff --git a/Documentation/hwmon/ftsteutates b/Documentation/hwmon/ftsteutates.rst
similarity index 100%
rename from Documentation/hwmon/ftsteutates
rename to Documentation/hwmon/ftsteutates.rst
diff --git a/Documentation/hwmon/g760a b/Documentation/hwmon/g760a.rst
similarity index 100%
rename from Documentation/hwmon/g760a
rename to Documentation/hwmon/g760a.rst
diff --git a/Documentation/hwmon/g762 b/Documentation/hwmon/g762.rst
similarity index 97%
rename from Documentation/hwmon/g762
rename to Documentation/hwmon/g762.rst
index 54574e26df21..0371b3365c48 100644
--- a/Documentation/hwmon/g762
+++ b/Documentation/hwmon/g762.rst
@@ -7,7 +7,7 @@ modes - PWM or DC - are supported by the device.
 
 For additional information, a detailed datasheet is available at
 http://natisbad.org/NAS/ref/GMT_EDS-762_763-080710-0.2.pdf. sysfs
-bindings are described in Documentation/hwmon/sysfs-interface.
+bindings are described in Documentation/hwmon/sysfs-interface.rst.
 
 The following entries are available to the user in a subdirectory of
 /sys/bus/i2c/drivers/g762/ to control the operation of the device.
diff --git a/Documentation/hwmon/gl518sm b/Documentation/hwmon/gl518sm.rst
similarity index 100%
rename from Documentation/hwmon/gl518sm
rename to Documentation/hwmon/gl518sm.rst
diff --git a/Documentation/hwmon/hih6130 b/Documentation/hwmon/hih6130.rst
similarity index 100%
rename from Documentation/hwmon/hih6130
rename to Documentation/hwmon/hih6130.rst
diff --git a/Documentation/hwmon/hwmon-kernel-api.txt b/Documentation/hwmon/hwmon-kernel-api.rst
similarity index 99%
rename from Documentation/hwmon/hwmon-kernel-api.txt
rename to Documentation/hwmon/hwmon-kernel-api.rst
index b56343f5c2c4..5766bee64153 100644
--- a/Documentation/hwmon/hwmon-kernel-api.txt
+++ b/Documentation/hwmon/hwmon-kernel-api.rst
@@ -12,10 +12,10 @@ drivers that want to use the hardware monitoring framework.
 This document does not describe what a hardware monitoring (hwmon) Driver or
 Device is. It also does not describe the API which can be used by user space
 to communicate with a hardware monitoring device. If you want to know this
-then please read the following file: Documentation/hwmon/sysfs-interface.
+then please read the following file: Documentation/hwmon/sysfs-interface.rst.
 
 For additional guidelines on how to write and improve hwmon drivers, please
-also read Documentation/hwmon/submitting-patches.
+also read Documentation/hwmon/submitting-patches.rst.
 
 The API
 -------
diff --git a/Documentation/hwmon/ibm-cffps b/Documentation/hwmon/ibm-cffps.rst
similarity index 100%
rename from Documentation/hwmon/ibm-cffps
rename to Documentation/hwmon/ibm-cffps.rst
diff --git a/Documentation/hwmon/ibmaem b/Documentation/hwmon/ibmaem.rst
similarity index 100%
rename from Documentation/hwmon/ibmaem
rename to Documentation/hwmon/ibmaem.rst
diff --git a/Documentation/hwmon/ibmpowernv b/Documentation/hwmon/ibmpowernv.rst
similarity index 100%
rename from Documentation/hwmon/ibmpowernv
rename to Documentation/hwmon/ibmpowernv.rst
diff --git a/Documentation/hwmon/ina209 b/Documentation/hwmon/ina209.rst
similarity index 100%
rename from Documentation/hwmon/ina209
rename to Documentation/hwmon/ina209.rst
diff --git a/Documentation/hwmon/ina2xx b/Documentation/hwmon/ina2xx.rst
similarity index 97%
rename from Documentation/hwmon/ina2xx
rename to Documentation/hwmon/ina2xx.rst
index 95badf9c396f..94b9a260c518 100644
--- a/Documentation/hwmon/ina2xx
+++ b/Documentation/hwmon/ina2xx.rst
@@ -78,7 +78,7 @@ refer to the Documentation/devicetree/bindings/hwmon/ina2xx.txt for bindings
 if the device tree is used.
 
 Additionally ina226 supports update_interval attribute as described in
-Documentation/hwmon/sysfs-interface. Internally the interval is the sum of
+Documentation/hwmon/sysfs-interface.rst. Internally the interval is the sum of
 bus and shunt voltage conversion times multiplied by the averaging rate. We
 don't touch the conversion times and only modify the number of averages. The
 lower limit of the update_interval is 2 ms, the upper limit is 2253 ms.
diff --git a/Documentation/hwmon/ina3221 b/Documentation/hwmon/ina3221.rst
similarity index 100%
rename from Documentation/hwmon/ina3221
rename to Documentation/hwmon/ina3221.rst
diff --git a/Documentation/hwmon/index.rst b/Documentation/hwmon/index.rst
new file mode 100644
index 000000000000..893804414510
--- /dev/null
+++ b/Documentation/hwmon/index.rst
@@ -0,0 +1,179 @@
+=========================
+Linux Hardware Monitoring
+=========================
+
+.. toctree::
+   :maxdepth: 1
+
+   hwmon-kernel-api.rst
+   pmbus-core.rst
+   submitting-patches.rst
+   sysfs-interface.rst
+   userspace-tools.rst
+
+Hardware Monitoring Kernel Drivers
+==================================
+
+.. toctree::
+   :maxdepth: 1
+
+   ab8500.rst
+   abituguru.rst
+   abituguru3.rst
+   abx500.rst
+   acpi_power_meter.rst
+   ad7314.rst
+   adc128d818.rst
+   adm1021.rst
+   adm1025.rst
+   adm1026.rst
+   adm1031.rst
+   adm1275.rst
+   adm9240.rst
+   ads1015.rst
+   ads7828.rst
+   adt7410.rst
+   adt7411.rst
+   adt7462.rst
+   adt7470.rst
+   adt7475.rst
+   amc6821.rst
+   asb100.rst
+   asc7621.rst
+   aspeed-pwm-tacho.rst
+   coretemp.rst
+   da9052.rst
+   da9055.rst
+   dme1737.rst
+   ds1621.rst
+   ds620.rst
+   emc1403.rst
+   emc2103.rst
+   emc6w201.rst
+   f71805f.rst
+   f71882fg.rst
+   fam15h_power.rst
+   ftsteutates.rst
+   g760a.rst
+   g762.rst
+   gl518sm.rst
+   hih6130.rst
+   ibmaem.rst
+   ibm-cffps.rst
+   ibmpowernv.rst
+   ina209.rst
+   ina2xx.rst
+   ina3221.rst
+   ir35221.rst
+   it87.rst
+   jc42.rst
+   k10temp.rst
+   k8temp.rst
+   lineage-pem.rst
+   lm25066.rst
+   lm63.rst
+   lm70.rst
+   lm73.rst
+   lm75.rst
+   lm77.rst
+   lm78.rst
+   lm80.rst
+   lm83.rst
+   lm85.rst
+   lm87.rst
+   lm90.rst
+   lm92.rst
+   lm93.rst
+   lm95234.rst
+   lm95245.rst
+   ltc2945.rst
+   ltc2978.rst
+   ltc2990.rst
+   ltc3815.rst
+   ltc4151.rst
+   ltc4215.rst
+   ltc4245.rst
+   ltc4260.rst
+   ltc4261.rst
+   max16064.rst
+   max16065.rst
+   max1619.rst
+   max1668.rst
+   max197.rst
+   max20751.rst
+   max31722.rst
+   max31785.rst
+   max31790.rst
+   max34440.rst
+   max6639.rst
+   max6642.rst
+   max6650.rst
+   max6697.rst
+   max8688.rst
+   mc13783-adc.rst
+   mcp3021.rst
+   menf21bmc.rst
+   mlxreg-fan.rst
+   nct6683.rst
+   nct6775.rst
+   nct7802.rst
+   nct7904.rst
+   npcm750-pwm-fan.rst
+   nsa320.rst
+   ntc_thermistor.rst
+   occ.rst
+   pc87360.rst
+   pc87427.rst
+   pcf8591.rst
+   pmbus.rst
+   powr1220.rst
+   pwm-fan.rst
+   raspberrypi-hwmon.rst
+   sch5627.rst
+   sch5636.rst
+   scpi-hwmon.rst
+   sht15.rst
+   sht21.rst
+   sht3x.rst
+   shtc1.rst
+   sis5595.rst
+   smm665.rst
+   smsc47b397.rst
+   smsc47m192.rst
+   smsc47m1.rst
+   tc654.rst
+   tc74.rst
+   thmc50.rst
+   tmp102.rst
+   tmp103.rst
+   tmp108.rst
+   tmp401.rst
+   tmp421.rst
+   tps40422.rst
+   twl4030-madc-hwmon.rst
+   ucd9000.rst
+   ucd9200.rst
+   vexpress.rst
+   via686a.rst
+   vt1211.rst
+   w83627ehf.rst
+   w83627hf.rst
+   w83773g.rst
+   w83781d.rst
+   w83791d.rst
+   w83792d.rst
+   w83793.rst
+   w83795.rst
+   w83l785ts.rst
+   w83l786ng.rst
+   wm831x.rst
+   wm8350.rst
+   xgene-hwmon.rst
+   zl6100.rst
+
+.. only::  subproject and html
+
+   Indices
+   =======
+
+   * :ref:`genindex`
diff --git a/Documentation/hwmon/ir35221 b/Documentation/hwmon/ir35221.rst
similarity index 100%
rename from Documentation/hwmon/ir35221
rename to Documentation/hwmon/ir35221.rst
diff --git a/Documentation/hwmon/it87 b/Documentation/hwmon/it87.rst
similarity index 100%
rename from Documentation/hwmon/it87
rename to Documentation/hwmon/it87.rst
diff --git a/Documentation/hwmon/jc42 b/Documentation/hwmon/jc42.rst
similarity index 100%
rename from Documentation/hwmon/jc42
rename to Documentation/hwmon/jc42.rst
diff --git a/Documentation/hwmon/k10temp b/Documentation/hwmon/k10temp.rst
similarity index 100%
rename from Documentation/hwmon/k10temp
rename to Documentation/hwmon/k10temp.rst
diff --git a/Documentation/hwmon/k8temp b/Documentation/hwmon/k8temp.rst
similarity index 100%
rename from Documentation/hwmon/k8temp
rename to Documentation/hwmon/k8temp.rst
diff --git a/Documentation/hwmon/lineage-pem b/Documentation/hwmon/lineage-pem.rst
similarity index 100%
rename from Documentation/hwmon/lineage-pem
rename to Documentation/hwmon/lineage-pem.rst
diff --git a/Documentation/hwmon/lm25066 b/Documentation/hwmon/lm25066.rst
similarity index 97%
rename from Documentation/hwmon/lm25066
rename to Documentation/hwmon/lm25066.rst
index 60b7f2722931..da15e3094c8c 100644
--- a/Documentation/hwmon/lm25066
+++ b/Documentation/hwmon/lm25066.rst
@@ -69,7 +69,7 @@ LM25066, LM5064, and LM5066/LM5066I Power Management, Monitoring,
 Control, and Protection ICs.
 
 The driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/lm63 b/Documentation/hwmon/lm63.rst
similarity index 100%
rename from Documentation/hwmon/lm63
rename to Documentation/hwmon/lm63.rst
diff --git a/Documentation/hwmon/lm70 b/Documentation/hwmon/lm70.rst
similarity index 100%
rename from Documentation/hwmon/lm70
rename to Documentation/hwmon/lm70.rst
diff --git a/Documentation/hwmon/lm73 b/Documentation/hwmon/lm73.rst
similarity index 100%
rename from Documentation/hwmon/lm73
rename to Documentation/hwmon/lm73.rst
diff --git a/Documentation/hwmon/lm75 b/Documentation/hwmon/lm75.rst
similarity index 100%
rename from Documentation/hwmon/lm75
rename to Documentation/hwmon/lm75.rst
diff --git a/Documentation/hwmon/lm77 b/Documentation/hwmon/lm77.rst
similarity index 100%
rename from Documentation/hwmon/lm77
rename to Documentation/hwmon/lm77.rst
diff --git a/Documentation/hwmon/lm78 b/Documentation/hwmon/lm78.rst
similarity index 100%
rename from Documentation/hwmon/lm78
rename to Documentation/hwmon/lm78.rst
diff --git a/Documentation/hwmon/lm80 b/Documentation/hwmon/lm80.rst
similarity index 100%
rename from Documentation/hwmon/lm80
rename to Documentation/hwmon/lm80.rst
diff --git a/Documentation/hwmon/lm83 b/Documentation/hwmon/lm83.rst
similarity index 100%
rename from Documentation/hwmon/lm83
rename to Documentation/hwmon/lm83.rst
diff --git a/Documentation/hwmon/lm85 b/Documentation/hwmon/lm85.rst
similarity index 100%
rename from Documentation/hwmon/lm85
rename to Documentation/hwmon/lm85.rst
diff --git a/Documentation/hwmon/lm87 b/Documentation/hwmon/lm87.rst
similarity index 100%
rename from Documentation/hwmon/lm87
rename to Documentation/hwmon/lm87.rst
diff --git a/Documentation/hwmon/lm90 b/Documentation/hwmon/lm90.rst
similarity index 100%
rename from Documentation/hwmon/lm90
rename to Documentation/hwmon/lm90.rst
diff --git a/Documentation/hwmon/lm92 b/Documentation/hwmon/lm92.rst
similarity index 100%
rename from Documentation/hwmon/lm92
rename to Documentation/hwmon/lm92.rst
diff --git a/Documentation/hwmon/lm93 b/Documentation/hwmon/lm93.rst
similarity index 100%
rename from Documentation/hwmon/lm93
rename to Documentation/hwmon/lm93.rst
diff --git a/Documentation/hwmon/lm95234 b/Documentation/hwmon/lm95234.rst
similarity index 100%
rename from Documentation/hwmon/lm95234
rename to Documentation/hwmon/lm95234.rst
diff --git a/Documentation/hwmon/lm95245 b/Documentation/hwmon/lm95245.rst
similarity index 100%
rename from Documentation/hwmon/lm95245
rename to Documentation/hwmon/lm95245.rst
diff --git a/Documentation/hwmon/ltc2945 b/Documentation/hwmon/ltc2945.rst
similarity index 100%
rename from Documentation/hwmon/ltc2945
rename to Documentation/hwmon/ltc2945.rst
diff --git a/Documentation/hwmon/ltc2978 b/Documentation/hwmon/ltc2978.rst
similarity index 100%
rename from Documentation/hwmon/ltc2978
rename to Documentation/hwmon/ltc2978.rst
diff --git a/Documentation/hwmon/ltc2990 b/Documentation/hwmon/ltc2990.rst
similarity index 100%
rename from Documentation/hwmon/ltc2990
rename to Documentation/hwmon/ltc2990.rst
diff --git a/Documentation/hwmon/ltc3815 b/Documentation/hwmon/ltc3815.rst
similarity index 100%
rename from Documentation/hwmon/ltc3815
rename to Documentation/hwmon/ltc3815.rst
diff --git a/Documentation/hwmon/ltc4151 b/Documentation/hwmon/ltc4151.rst
similarity index 100%
rename from Documentation/hwmon/ltc4151
rename to Documentation/hwmon/ltc4151.rst
diff --git a/Documentation/hwmon/ltc4215 b/Documentation/hwmon/ltc4215.rst
similarity index 100%
rename from Documentation/hwmon/ltc4215
rename to Documentation/hwmon/ltc4215.rst
diff --git a/Documentation/hwmon/ltc4245 b/Documentation/hwmon/ltc4245.rst
similarity index 100%
rename from Documentation/hwmon/ltc4245
rename to Documentation/hwmon/ltc4245.rst
diff --git a/Documentation/hwmon/ltc4260 b/Documentation/hwmon/ltc4260.rst
similarity index 100%
rename from Documentation/hwmon/ltc4260
rename to Documentation/hwmon/ltc4260.rst
diff --git a/Documentation/hwmon/ltc4261 b/Documentation/hwmon/ltc4261.rst
similarity index 100%
rename from Documentation/hwmon/ltc4261
rename to Documentation/hwmon/ltc4261.rst
diff --git a/Documentation/hwmon/max16064 b/Documentation/hwmon/max16064.rst
similarity index 96%
rename from Documentation/hwmon/max16064
rename to Documentation/hwmon/max16064.rst
index 61ec679dc477..6d5e9538991f 100644
--- a/Documentation/hwmon/max16064
+++ b/Documentation/hwmon/max16064.rst
@@ -21,7 +21,7 @@ This driver supports hardware monitoring for Maxim MAX16064 Quad Power-Supply
 Controller with Active-Voltage Output Control and PMBus Interface.
 
 The driver is a client driver to the core PMBus driver.
-Please see Documentation/hwmon/pmbus for details on PMBus client drivers.
+Please see Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/max16065 b/Documentation/hwmon/max16065.rst
similarity index 100%
rename from Documentation/hwmon/max16065
rename to Documentation/hwmon/max16065.rst
diff --git a/Documentation/hwmon/max1619 b/Documentation/hwmon/max1619.rst
similarity index 100%
rename from Documentation/hwmon/max1619
rename to Documentation/hwmon/max1619.rst
diff --git a/Documentation/hwmon/max1668 b/Documentation/hwmon/max1668.rst
similarity index 100%
rename from Documentation/hwmon/max1668
rename to Documentation/hwmon/max1668.rst
diff --git a/Documentation/hwmon/max197 b/Documentation/hwmon/max197.rst
similarity index 100%
rename from Documentation/hwmon/max197
rename to Documentation/hwmon/max197.rst
diff --git a/Documentation/hwmon/max20751 b/Documentation/hwmon/max20751.rst
similarity index 96%
rename from Documentation/hwmon/max20751
rename to Documentation/hwmon/max20751.rst
index d546695900ef..aa4469be6674 100644
--- a/Documentation/hwmon/max20751
+++ b/Documentation/hwmon/max20751.rst
@@ -23,7 +23,7 @@ This driver supports MAX20751 Multiphase Master with PMBus Interface
 and Internal Buck Converter.
 
 The driver is a client driver to the core PMBus driver.
-Please see Documentation/hwmon/pmbus for details on PMBus client drivers.
+Please see Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/max31722 b/Documentation/hwmon/max31722.rst
similarity index 100%
rename from Documentation/hwmon/max31722
rename to Documentation/hwmon/max31722.rst
diff --git a/Documentation/hwmon/max31785 b/Documentation/hwmon/max31785.rst
similarity index 100%
rename from Documentation/hwmon/max31785
rename to Documentation/hwmon/max31785.rst
diff --git a/Documentation/hwmon/max31790 b/Documentation/hwmon/max31790.rst
similarity index 100%
rename from Documentation/hwmon/max31790
rename to Documentation/hwmon/max31790.rst
diff --git a/Documentation/hwmon/max34440 b/Documentation/hwmon/max34440.rst
similarity index 98%
rename from Documentation/hwmon/max34440
rename to Documentation/hwmon/max34440.rst
index 639838ef29fd..939138e12b02 100644
--- a/Documentation/hwmon/max34440
+++ b/Documentation/hwmon/max34440.rst
@@ -76,7 +76,7 @@ based on GIN pins. The MAX34460 supports 12 voltage channels, and the MAX34461
 supports 16 voltage channels.
 
 The driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/max6639 b/Documentation/hwmon/max6639.rst
similarity index 100%
rename from Documentation/hwmon/max6639
rename to Documentation/hwmon/max6639.rst
diff --git a/Documentation/hwmon/max6642 b/Documentation/hwmon/max6642.rst
similarity index 100%
rename from Documentation/hwmon/max6642
rename to Documentation/hwmon/max6642.rst
diff --git a/Documentation/hwmon/max6650 b/Documentation/hwmon/max6650.rst
similarity index 100%
rename from Documentation/hwmon/max6650
rename to Documentation/hwmon/max6650.rst
diff --git a/Documentation/hwmon/max6697 b/Documentation/hwmon/max6697.rst
similarity index 100%
rename from Documentation/hwmon/max6697
rename to Documentation/hwmon/max6697.rst
diff --git a/Documentation/hwmon/max8688 b/Documentation/hwmon/max8688.rst
similarity index 97%
rename from Documentation/hwmon/max8688
rename to Documentation/hwmon/max8688.rst
index 43da139234c1..009487759c61 100644
--- a/Documentation/hwmon/max8688
+++ b/Documentation/hwmon/max8688.rst
@@ -21,7 +21,7 @@ This driver supports hardware monitoring for Maxim MAX8688 Digital Power-Supply
 Controller/Monitor with PMBus Interface.
 
 The driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/mc13783-adc b/Documentation/hwmon/mc13783-adc.rst
similarity index 100%
rename from Documentation/hwmon/mc13783-adc
rename to Documentation/hwmon/mc13783-adc.rst
diff --git a/Documentation/hwmon/mcp3021 b/Documentation/hwmon/mcp3021.rst
similarity index 100%
rename from Documentation/hwmon/mcp3021
rename to Documentation/hwmon/mcp3021.rst
diff --git a/Documentation/hwmon/menf21bmc b/Documentation/hwmon/menf21bmc.rst
similarity index 100%
rename from Documentation/hwmon/menf21bmc
rename to Documentation/hwmon/menf21bmc.rst
diff --git a/Documentation/hwmon/mlxreg-fan b/Documentation/hwmon/mlxreg-fan.rst
similarity index 100%
rename from Documentation/hwmon/mlxreg-fan
rename to Documentation/hwmon/mlxreg-fan.rst
diff --git a/Documentation/hwmon/nct6683 b/Documentation/hwmon/nct6683.rst
similarity index 100%
rename from Documentation/hwmon/nct6683
rename to Documentation/hwmon/nct6683.rst
diff --git a/Documentation/hwmon/nct6775 b/Documentation/hwmon/nct6775.rst
similarity index 100%
rename from Documentation/hwmon/nct6775
rename to Documentation/hwmon/nct6775.rst
diff --git a/Documentation/hwmon/nct7802 b/Documentation/hwmon/nct7802.rst
similarity index 100%
rename from Documentation/hwmon/nct7802
rename to Documentation/hwmon/nct7802.rst
diff --git a/Documentation/hwmon/nct7904 b/Documentation/hwmon/nct7904.rst
similarity index 100%
rename from Documentation/hwmon/nct7904
rename to Documentation/hwmon/nct7904.rst
diff --git a/Documentation/hwmon/npcm750-pwm-fan b/Documentation/hwmon/npcm750-pwm-fan.rst
similarity index 100%
rename from Documentation/hwmon/npcm750-pwm-fan
rename to Documentation/hwmon/npcm750-pwm-fan.rst
diff --git a/Documentation/hwmon/nsa320 b/Documentation/hwmon/nsa320.rst
similarity index 100%
rename from Documentation/hwmon/nsa320
rename to Documentation/hwmon/nsa320.rst
diff --git a/Documentation/hwmon/ntc_thermistor b/Documentation/hwmon/ntc_thermistor.rst
similarity index 100%
rename from Documentation/hwmon/ntc_thermistor
rename to Documentation/hwmon/ntc_thermistor.rst
diff --git a/Documentation/hwmon/occ b/Documentation/hwmon/occ.rst
similarity index 100%
rename from Documentation/hwmon/occ
rename to Documentation/hwmon/occ.rst
diff --git a/Documentation/hwmon/pc87360 b/Documentation/hwmon/pc87360.rst
similarity index 100%
rename from Documentation/hwmon/pc87360
rename to Documentation/hwmon/pc87360.rst
diff --git a/Documentation/hwmon/pc87427 b/Documentation/hwmon/pc87427.rst
similarity index 100%
rename from Documentation/hwmon/pc87427
rename to Documentation/hwmon/pc87427.rst
diff --git a/Documentation/hwmon/pcf8591 b/Documentation/hwmon/pcf8591.rst
similarity index 100%
rename from Documentation/hwmon/pcf8591
rename to Documentation/hwmon/pcf8591.rst
diff --git a/Documentation/hwmon/pmbus-core b/Documentation/hwmon/pmbus-core.rst
similarity index 100%
rename from Documentation/hwmon/pmbus-core
rename to Documentation/hwmon/pmbus-core.rst
diff --git a/Documentation/hwmon/pmbus b/Documentation/hwmon/pmbus.rst
similarity index 100%
rename from Documentation/hwmon/pmbus
rename to Documentation/hwmon/pmbus.rst
diff --git a/Documentation/hwmon/powr1220 b/Documentation/hwmon/powr1220.rst
similarity index 100%
rename from Documentation/hwmon/powr1220
rename to Documentation/hwmon/powr1220.rst
diff --git a/Documentation/hwmon/pwm-fan b/Documentation/hwmon/pwm-fan.rst
similarity index 100%
rename from Documentation/hwmon/pwm-fan
rename to Documentation/hwmon/pwm-fan.rst
diff --git a/Documentation/hwmon/raspberrypi-hwmon b/Documentation/hwmon/raspberrypi-hwmon.rst
similarity index 100%
rename from Documentation/hwmon/raspberrypi-hwmon
rename to Documentation/hwmon/raspberrypi-hwmon.rst
diff --git a/Documentation/hwmon/sch5627 b/Documentation/hwmon/sch5627.rst
similarity index 100%
rename from Documentation/hwmon/sch5627
rename to Documentation/hwmon/sch5627.rst
diff --git a/Documentation/hwmon/sch5636 b/Documentation/hwmon/sch5636.rst
similarity index 100%
rename from Documentation/hwmon/sch5636
rename to Documentation/hwmon/sch5636.rst
diff --git a/Documentation/hwmon/scpi-hwmon b/Documentation/hwmon/scpi-hwmon.rst
similarity index 100%
rename from Documentation/hwmon/scpi-hwmon
rename to Documentation/hwmon/scpi-hwmon.rst
diff --git a/Documentation/hwmon/sht15 b/Documentation/hwmon/sht15.rst
similarity index 100%
rename from Documentation/hwmon/sht15
rename to Documentation/hwmon/sht15.rst
diff --git a/Documentation/hwmon/sht21 b/Documentation/hwmon/sht21.rst
similarity index 100%
rename from Documentation/hwmon/sht21
rename to Documentation/hwmon/sht21.rst
diff --git a/Documentation/hwmon/sht3x b/Documentation/hwmon/sht3x.rst
similarity index 100%
rename from Documentation/hwmon/sht3x
rename to Documentation/hwmon/sht3x.rst
diff --git a/Documentation/hwmon/shtc1 b/Documentation/hwmon/shtc1.rst
similarity index 100%
rename from Documentation/hwmon/shtc1
rename to Documentation/hwmon/shtc1.rst
diff --git a/Documentation/hwmon/sis5595 b/Documentation/hwmon/sis5595.rst
similarity index 100%
rename from Documentation/hwmon/sis5595
rename to Documentation/hwmon/sis5595.rst
diff --git a/Documentation/hwmon/smm665 b/Documentation/hwmon/smm665.rst
similarity index 100%
rename from Documentation/hwmon/smm665
rename to Documentation/hwmon/smm665.rst
diff --git a/Documentation/hwmon/smsc47b397 b/Documentation/hwmon/smsc47b397.rst
similarity index 100%
rename from Documentation/hwmon/smsc47b397
rename to Documentation/hwmon/smsc47b397.rst
diff --git a/Documentation/hwmon/smsc47m1 b/Documentation/hwmon/smsc47m1.rst
similarity index 100%
rename from Documentation/hwmon/smsc47m1
rename to Documentation/hwmon/smsc47m1.rst
diff --git a/Documentation/hwmon/smsc47m192 b/Documentation/hwmon/smsc47m192.rst
similarity index 100%
rename from Documentation/hwmon/smsc47m192
rename to Documentation/hwmon/smsc47m192.rst
diff --git a/Documentation/hwmon/submitting-patches b/Documentation/hwmon/submitting-patches.rst
similarity index 98%
rename from Documentation/hwmon/submitting-patches
rename to Documentation/hwmon/submitting-patches.rst
index 12540b7d9b50..f9796b9d9db6 100644
--- a/Documentation/hwmon/submitting-patches
+++ b/Documentation/hwmon/submitting-patches.rst
@@ -39,7 +39,7 @@ increase the chances of your change being accepted.
 2. Adding functionality to existing drivers
 -------------------------------------------
 
-* Make sure the documentation in Documentation/hwmon/<driver_name> is up to
+* Make sure the documentation in Documentation/hwmon/<driver_name>.rst is up to
   date.
 
 * Make sure the information in Kconfig is up to date.
@@ -61,7 +61,7 @@ increase the chances of your change being accepted.
 
 * Consider adding yourself to MAINTAINERS.
 
-* Document the driver in Documentation/hwmon/<driver_name>.
+* Document the driver in Documentation/hwmon/<driver_name>.rst.
 
 * Add the driver to Kconfig and Makefile in alphabetical order.
 
@@ -134,7 +134,7 @@ increase the chances of your change being accepted.
   non-standard attributes, or you believe you do, discuss it on the mailing list
   first. Either case, provide a detailed explanation why you need the
   non-standard attribute(s).
-  Standard attributes are specified in Documentation/hwmon/sysfs-interface.
+  Standard attributes are specified in Documentation/hwmon/sysfs-interface.rst.
 
 * When deciding which sysfs attributes to support, look at the chip's
   capabilities. While we do not expect your driver to support everything the
diff --git a/Documentation/hwmon/sysfs-interface b/Documentation/hwmon/sysfs-interface.rst
similarity index 100%
rename from Documentation/hwmon/sysfs-interface
rename to Documentation/hwmon/sysfs-interface.rst
diff --git a/Documentation/hwmon/tc654 b/Documentation/hwmon/tc654.rst
similarity index 100%
rename from Documentation/hwmon/tc654
rename to Documentation/hwmon/tc654.rst
diff --git a/Documentation/hwmon/tc74 b/Documentation/hwmon/tc74.rst
similarity index 100%
rename from Documentation/hwmon/tc74
rename to Documentation/hwmon/tc74.rst
diff --git a/Documentation/hwmon/thmc50 b/Documentation/hwmon/thmc50.rst
similarity index 100%
rename from Documentation/hwmon/thmc50
rename to Documentation/hwmon/thmc50.rst
diff --git a/Documentation/hwmon/tmp102 b/Documentation/hwmon/tmp102.rst
similarity index 93%
rename from Documentation/hwmon/tmp102
rename to Documentation/hwmon/tmp102.rst
index 5e34821df4ab..b1f585531a88 100644
--- a/Documentation/hwmon/tmp102
+++ b/Documentation/hwmon/tmp102.rst
@@ -28,4 +28,4 @@ The TMP102 has a programmable update rate that can select between 8, 4, 1, and
 0.5 Hz. (Currently the driver only supports the default of 4 Hz).
 
 The driver provides the common sysfs-interface for temperatures (see
-Documentation/hwmon/sysfs-interface under Temperatures).
+Documentation/hwmon/sysfs-interface.rst under Temperatures).
diff --git a/Documentation/hwmon/tmp103 b/Documentation/hwmon/tmp103.rst
similarity index 92%
rename from Documentation/hwmon/tmp103
rename to Documentation/hwmon/tmp103.rst
index 7682a795e38c..15d25806d585 100644
--- a/Documentation/hwmon/tmp103
+++ b/Documentation/hwmon/tmp103.rst
@@ -27,7 +27,7 @@ Resolution: 8 Bits
 Accuracy: ?1?C Typ (?10?C to +100?C)
 
 The driver provides the common sysfs-interface for temperatures (see
-Documentation/hwmon/sysfs-interface under Temperatures).
+Documentation/hwmon/sysfs-interface.rst under Temperatures).
 
 Please refer how to instantiate this driver:
 Documentation/i2c/instantiating-devices
diff --git a/Documentation/hwmon/tmp108 b/Documentation/hwmon/tmp108.rst
similarity index 95%
rename from Documentation/hwmon/tmp108
rename to Documentation/hwmon/tmp108.rst
index 7e08b7ef1e2f..5f4266a16cb2 100644
--- a/Documentation/hwmon/tmp108
+++ b/Documentation/hwmon/tmp108.rst
@@ -38,4 +38,4 @@ and then the device is shut down automatically. (This driver only supports
 continuous mode.)
 
 The driver provides the common sysfs-interface for temperatures (see
-Documentation/hwmon/sysfs-interface under Temperatures).
+Documentation/hwmon/sysfs-interface.rst under Temperatures).
diff --git a/Documentation/hwmon/tmp401 b/Documentation/hwmon/tmp401.rst
similarity index 97%
rename from Documentation/hwmon/tmp401
rename to Documentation/hwmon/tmp401.rst
index bd865bbdb38d..6a05a0719bc7 100644
--- a/Documentation/hwmon/tmp401
+++ b/Documentation/hwmon/tmp401.rst
@@ -68,7 +68,7 @@ supported by the driver so far, so using the default resolution of 0.5
 degree).
 
 The driver provides the common sysfs-interface for temperatures (see
-Documentation/hwmon/sysfs-interface under Temperatures).
+Documentation/hwmon/sysfs-interface.rst under Temperatures).
 
 The TMP411 and TMP431 chips are compatible with TMP401. TMP411 provides
 some additional features.
diff --git a/Documentation/hwmon/tmp421 b/Documentation/hwmon/tmp421.rst
similarity index 100%
rename from Documentation/hwmon/tmp421
rename to Documentation/hwmon/tmp421.rst
diff --git a/Documentation/hwmon/tps40422 b/Documentation/hwmon/tps40422.rst
similarity index 96%
rename from Documentation/hwmon/tps40422
rename to Documentation/hwmon/tps40422.rst
index 359751eb5ed4..b691e30479dd 100644
--- a/Documentation/hwmon/tps40422
+++ b/Documentation/hwmon/tps40422.rst
@@ -21,7 +21,7 @@ This driver supports TI TPS40422 Dual-Output or Two-Phase Synchronous Buck
 Controller with PMBus
 
 The driver is a client driver to the core PMBus driver.
-Please see Documentation/hwmon/pmbus for details on PMBus client drivers.
+Please see Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
diff --git a/Documentation/hwmon/twl4030-madc-hwmon b/Documentation/hwmon/twl4030-madc-hwmon.rst
similarity index 100%
rename from Documentation/hwmon/twl4030-madc-hwmon
rename to Documentation/hwmon/twl4030-madc-hwmon.rst
diff --git a/Documentation/hwmon/ucd9000 b/Documentation/hwmon/ucd9000.rst
similarity index 97%
rename from Documentation/hwmon/ucd9000
rename to Documentation/hwmon/ucd9000.rst
index d69061b7312c..ebc4f2b3bfea 100644
--- a/Documentation/hwmon/ucd9000
+++ b/Documentation/hwmon/ucd9000.rst
@@ -57,7 +57,7 @@ system-health monitor. The device integrates a 12-bit ADC for monitoring up to
 13 power-supply voltage, current, or temperature inputs.
 
 This driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
@@ -72,7 +72,7 @@ Platform data support
 ---------------------
 
 The driver supports standard PMBus driver platform data. Please see
-Documentation/hwmon/pmbus for details.
+Documentation/hwmon/pmbus.rst for details.
 
 
 Sysfs entries
diff --git a/Documentation/hwmon/ucd9200 b/Documentation/hwmon/ucd9200.rst
similarity index 97%
rename from Documentation/hwmon/ucd9200
rename to Documentation/hwmon/ucd9200.rst
index 44eda4a579b6..b819dfd75f71 100644
--- a/Documentation/hwmon/ucd9200
+++ b/Documentation/hwmon/ucd9200.rst
@@ -33,7 +33,7 @@ dedicated circuitry for DC/DC loop management with flash memory and a serial
 interface to support configuration, monitoring and management.
 
 This driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus for details on PMBus client drivers.
+Documentation/hwmon/pmbus.rst for details on PMBus client drivers.
 
 
 Usage Notes
@@ -48,7 +48,7 @@ Platform data support
 ---------------------
 
 The driver supports standard PMBus driver platform data. Please see
-Documentation/hwmon/pmbus for details.
+Documentation/hwmon/pmbus.rst for details.
 
 
 Sysfs entries
diff --git a/Documentation/hwmon/userspace-tools b/Documentation/hwmon/userspace-tools.rst
similarity index 100%
rename from Documentation/hwmon/userspace-tools
rename to Documentation/hwmon/userspace-tools.rst
diff --git a/Documentation/hwmon/vexpress b/Documentation/hwmon/vexpress.rst
similarity index 100%
rename from Documentation/hwmon/vexpress
rename to Documentation/hwmon/vexpress.rst
diff --git a/Documentation/hwmon/via686a b/Documentation/hwmon/via686a.rst
similarity index 100%
rename from Documentation/hwmon/via686a
rename to Documentation/hwmon/via686a.rst
diff --git a/Documentation/hwmon/vt1211 b/Documentation/hwmon/vt1211.rst
similarity index 100%
rename from Documentation/hwmon/vt1211
rename to Documentation/hwmon/vt1211.rst
diff --git a/Documentation/hwmon/w83627ehf b/Documentation/hwmon/w83627ehf.rst
similarity index 100%
rename from Documentation/hwmon/w83627ehf
rename to Documentation/hwmon/w83627ehf.rst
diff --git a/Documentation/hwmon/w83627hf b/Documentation/hwmon/w83627hf.rst
similarity index 100%
rename from Documentation/hwmon/w83627hf
rename to Documentation/hwmon/w83627hf.rst
diff --git a/Documentation/hwmon/w83773g b/Documentation/hwmon/w83773g.rst
similarity index 100%
rename from Documentation/hwmon/w83773g
rename to Documentation/hwmon/w83773g.rst
diff --git a/Documentation/hwmon/w83781d b/Documentation/hwmon/w83781d.rst
similarity index 100%
rename from Documentation/hwmon/w83781d
rename to Documentation/hwmon/w83781d.rst
diff --git a/Documentation/hwmon/w83791d b/Documentation/hwmon/w83791d.rst
similarity index 99%
rename from Documentation/hwmon/w83791d
rename to Documentation/hwmon/w83791d.rst
index a91f9e5fb0c6..3adaed39b157 100644
--- a/Documentation/hwmon/w83791d
+++ b/Documentation/hwmon/w83791d.rst
@@ -102,7 +102,7 @@ This file is used for both legacy and new code.
 
 The sysfs interface to the beep bitmask has migrated from the original legacy
 method of a single sysfs beep_mask file to a newer method using multiple
-`*_beep` files as described in `Documentation/hwmon/sysfs-interface`.
+`*_beep` files as described in `Documentation/hwmon/sysfs-interface.rst`.
 
 A similar change has occurred for the bitmap corresponding to the alarms. The
 original legacy method used a single sysfs alarms file containing a bitmap
diff --git a/Documentation/hwmon/w83792d b/Documentation/hwmon/w83792d.rst
similarity index 100%
rename from Documentation/hwmon/w83792d
rename to Documentation/hwmon/w83792d.rst
diff --git a/Documentation/hwmon/w83793 b/Documentation/hwmon/w83793.rst
similarity index 100%
rename from Documentation/hwmon/w83793
rename to Documentation/hwmon/w83793.rst
diff --git a/Documentation/hwmon/w83795 b/Documentation/hwmon/w83795.rst
similarity index 100%
rename from Documentation/hwmon/w83795
rename to Documentation/hwmon/w83795.rst
diff --git a/Documentation/hwmon/w83l785ts b/Documentation/hwmon/w83l785ts.rst
similarity index 100%
rename from Documentation/hwmon/w83l785ts
rename to Documentation/hwmon/w83l785ts.rst
diff --git a/Documentation/hwmon/w83l786ng b/Documentation/hwmon/w83l786ng.rst
similarity index 100%
rename from Documentation/hwmon/w83l786ng
rename to Documentation/hwmon/w83l786ng.rst
diff --git a/Documentation/hwmon/wm831x b/Documentation/hwmon/wm831x.rst
similarity index 100%
rename from Documentation/hwmon/wm831x
rename to Documentation/hwmon/wm831x.rst
diff --git a/Documentation/hwmon/wm8350 b/Documentation/hwmon/wm8350.rst
similarity index 100%
rename from Documentation/hwmon/wm8350
rename to Documentation/hwmon/wm8350.rst
diff --git a/Documentation/hwmon/xgene-hwmon b/Documentation/hwmon/xgene-hwmon.rst
similarity index 100%
rename from Documentation/hwmon/xgene-hwmon
rename to Documentation/hwmon/xgene-hwmon.rst
diff --git a/Documentation/hwmon/zl6100 b/Documentation/hwmon/zl6100.rst
similarity index 98%
rename from Documentation/hwmon/zl6100
rename to Documentation/hwmon/zl6100.rst
index 4029970bace4..41513bb7fe51 100644
--- a/Documentation/hwmon/zl6100
+++ b/Documentation/hwmon/zl6100.rst
@@ -113,7 +113,7 @@ This driver supports hardware monitoring for Intersil / Zilker Labs ZL6100 and
 compatible digital DC-DC controllers.
 
 The driver is a client driver to the core PMBus driver. Please see
-Documentation/hwmon/pmbus and Documentation.hwmon/pmbus-core for details
+Documentation/hwmon/pmbus.rst and Documentation.hwmon/pmbus-core for details
 on PMBus client drivers.
 
 
diff --git a/Documentation/index.rst b/Documentation/index.rst
index 80a421cb935e..3a710dc24fc8 100644
--- a/Documentation/index.rst
+++ b/Documentation/index.rst
@@ -83,6 +83,7 @@ needed).
    media/index
    networking/index
    input/index
+   hwmon/index
    gpu/index
    security/index
    sound/index
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
index 911399730c1c..c3fa500df92c 100644
--- a/Documentation/thermal/sysfs-api.txt
+++ b/Documentation/thermal/sysfs-api.txt
@@ -316,7 +316,7 @@ ACPI thermal zones.
     |---temp[1-*]_input:	The current temperature of thermal zone [1-*]
     |---temp[1-*]_critical:	The critical trip point of thermal zone [1-*]
 
-Please read Documentation/hwmon/sysfs-interface for additional information.
+Please read Documentation/hwmon/sysfs-interface.rst for additional information.
 
 ***************************
 * Thermal zone attributes *
diff --git a/MAINTAINERS b/MAINTAINERS
index dc615cb76455..d258fb8e7e8e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -468,7 +468,7 @@ ADM1025 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/adm1025
+F:	Documentation/hwmon/adm1025.rst
 F:	drivers/hwmon/adm1025.c
 
 ADM1029 HARDWARE MONITOR DRIVER
@@ -520,7 +520,7 @@ ADS1015 HARDWARE MONITOR DRIVER
 M:	Dirk Eibach <eibach@gdsys.de>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/ads1015
+F:	Documentation/hwmon/ads1015.rst
 F:	drivers/hwmon/ads1015.c
 F:	include/linux/platform_data/ads1015.h
 
@@ -533,7 +533,7 @@ ADT7475 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/adt7475
+F:	Documentation/hwmon/adt7475.rst
 F:	drivers/hwmon/adt7475.c
 
 ADVANSYS SCSI DRIVER
@@ -764,7 +764,7 @@ AMD FAM15H PROCESSOR POWER MONITORING DRIVER
 M:	Huang Rui <ray.huang@amd.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Supported
-F:	Documentation/hwmon/fam15h_power
+F:	Documentation/hwmon/fam15h_power.rst
 F:	drivers/hwmon/fam15h_power.c
 
 AMD FCH GPIO DRIVER
@@ -2512,7 +2512,7 @@ ASC7621 HARDWARE MONITOR DRIVER
 M:	George Joseph <george.joseph@fairview5.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/asc7621
+F:	Documentation/hwmon/asc7621.rst
 F:	drivers/hwmon/asc7621.c
 
 ASPEED VIDEO ENGINE DRIVER
@@ -4043,7 +4043,7 @@ CORETEMP HARDWARE MONITORING DRIVER
 M:	Fenghua Yu <fenghua.yu@intel.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/coretemp
+F:	Documentation/hwmon/coretemp.rst
 F:	drivers/hwmon/coretemp.c
 
 COSA/SRP SYNC SERIAL DRIVER
@@ -4598,7 +4598,7 @@ DIALOG SEMICONDUCTOR DRIVERS
 M:	Support Opensource <support.opensource@diasemi.com>
 W:	http://www.dialog-semiconductor.com/products
 S:	Supported
-F:	Documentation/hwmon/da90??
+F:	Documentation/hwmon/da90??.rst
 F:	Documentation/devicetree/bindings/mfd/da90*.txt
 F:	Documentation/devicetree/bindings/input/da90??-onkey.txt
 F:	Documentation/devicetree/bindings/thermal/da90??-thermal.txt
@@ -4749,7 +4749,7 @@ DME1737 HARDWARE MONITOR DRIVER
 M:	Juerg Haefliger <juergh@gmail.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/dme1737
+F:	Documentation/hwmon/dme1737.rst
 F:	drivers/hwmon/dme1737.c
 
 DMI/SMBIOS SUPPORT
@@ -5935,7 +5935,7 @@ F71805F HARDWARE MONITORING DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/f71805f
+F:	Documentation/hwmon/f71805f.rst
 F:	drivers/hwmon/f71805f.c
 
 FADDR2LINE
@@ -7618,7 +7618,7 @@ INA209 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/ina209
+F:	Documentation/hwmon/ina209.rst
 F:	Documentation/devicetree/bindings/hwmon/ina2xx.txt
 F:	drivers/hwmon/ina209.c
 
@@ -7626,7 +7626,7 @@ INA2XX HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/ina2xx
+F:	Documentation/hwmon/ina2xx.rst
 F:	drivers/hwmon/ina2xx.c
 F:	include/linux/platform_data/ina2xx.h
 
@@ -8244,7 +8244,7 @@ IT87 HARDWARE MONITORING DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/it87
+F:	Documentation/hwmon/it87.rst
 F:	drivers/hwmon/it87.c
 
 IT913X MEDIA DRIVER
@@ -8288,7 +8288,7 @@ M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
 F:	drivers/hwmon/jc42.c
-F:	Documentation/hwmon/jc42
+F:	Documentation/hwmon/jc42.rst
 
 JFS FILESYSTEM
 M:	Dave Kleikamp <shaggy@kernel.org>
@@ -8336,14 +8336,14 @@ K10TEMP HARDWARE MONITORING DRIVER
 M:	Clemens Ladisch <clemens@ladisch.de>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/k10temp
+F:	Documentation/hwmon/k10temp.rst
 F:	drivers/hwmon/k10temp.c
 
 K8TEMP HARDWARE MONITORING DRIVER
 M:	Rudolf Marek <r.marek@assembler.cz>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/k8temp
+F:	Documentation/hwmon/k8temp.rst
 F:	drivers/hwmon/k8temp.c
 
 KASAN
@@ -9034,21 +9034,21 @@ LM78 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/lm78
+F:	Documentation/hwmon/lm78.rst
 F:	drivers/hwmon/lm78.c
 
 LM83 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/lm83
+F:	Documentation/hwmon/lm83.rst
 F:	drivers/hwmon/lm83.c
 
 LM90 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/lm90
+F:	Documentation/hwmon/lm90.rst
 F:	Documentation/devicetree/bindings/hwmon/lm90.txt
 F:	drivers/hwmon/lm90.c
 F:	include/dt-bindings/thermal/lm90.h
@@ -9057,7 +9057,7 @@ LM95234 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/lm95234
+F:	Documentation/hwmon/lm95234.rst
 F:	drivers/hwmon/lm95234.c
 
 LME2510 MEDIA DRIVER
@@ -9131,7 +9131,7 @@ LTC4261 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/ltc4261
+F:	Documentation/hwmon/ltc4261.rst
 F:	drivers/hwmon/ltc4261.c
 
 LTC4306 I2C MULTIPLEXER DRIVER
@@ -9362,7 +9362,7 @@ MAX16065 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/max16065
+F:	Documentation/hwmon/max16065.rst
 F:	drivers/hwmon/max16065.c
 
 MAX2175 SDR TUNER DRIVER
@@ -9378,14 +9378,14 @@ F:	include/uapi/linux/max2175.h
 MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
 L:	linux-hwmon at vger.kernel.org
 S:	Orphan
-F:	Documentation/hwmon/max6650
+F:	Documentation/hwmon/max6650.rst
 F:	drivers/hwmon/max6650.c
 
 MAX6697 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/max6697
+F:	Documentation/hwmon/max6697.rst
 F:	Documentation/devicetree/bindings/hwmon/max6697.txt
 F:	drivers/hwmon/max6697.c
 F:	include/linux/platform_data/max6697.h
@@ -10031,7 +10031,7 @@ F:	drivers/mfd/menf21bmc.c
 F:	drivers/watchdog/menf21bmc_wdt.c
 F:	drivers/leds/leds-menf21bmc.c
 F:	drivers/hwmon/menf21bmc_hwmon.c
-F:	Documentation/hwmon/menf21bmc
+F:	Documentation/hwmon/menf21bmc.rst
 
 MEN Z069 WATCHDOG DRIVER
 M:	Johannes Thumshirn <jth@kernel.org>
@@ -10659,7 +10659,7 @@ NCT6775 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/nct6775
+F:	Documentation/hwmon/nct6775.rst
 F:	drivers/hwmon/nct6775.c
 
 NET_FAILOVER MODULE
@@ -11753,7 +11753,7 @@ PC87360 HARDWARE MONITORING DRIVER
 M:	Jim Cromie <jim.cromie@gmail.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/pc87360
+F:	Documentation/hwmon/pc87360.rst
 F:	drivers/hwmon/pc87360.c
 
 PC8736x GPIO DRIVER
@@ -11765,7 +11765,7 @@ PC87427 HARDWARE MONITORING DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/pc87427
+F:	Documentation/hwmon/pc87427.rst
 F:	drivers/hwmon/pc87427.c
 
 PCA9532 LED DRIVER
@@ -12333,23 +12333,23 @@ S:	Maintained
 F:	Documentation/devicetree/bindings/hwmon/ibm,cffps1.txt
 F:	Documentation/devicetree/bindings/hwmon/max31785.txt
 F:	Documentation/devicetree/bindings/hwmon/ltc2978.txt
-F:	Documentation/hwmon/adm1275
-F:	Documentation/hwmon/ibm-cffps
-F:	Documentation/hwmon/ir35221
-F:	Documentation/hwmon/lm25066
-F:	Documentation/hwmon/ltc2978
-F:	Documentation/hwmon/ltc3815
-F:	Documentation/hwmon/max16064
-F:	Documentation/hwmon/max20751
-F:	Documentation/hwmon/max31785
-F:	Documentation/hwmon/max34440
-F:	Documentation/hwmon/max8688
-F:	Documentation/hwmon/pmbus
-F:	Documentation/hwmon/pmbus-core
-F:	Documentation/hwmon/tps40422
-F:	Documentation/hwmon/ucd9000
-F:	Documentation/hwmon/ucd9200
-F:	Documentation/hwmon/zl6100
+F:	Documentation/hwmon/adm1275.rst
+F:	Documentation/hwmon/ibm-cffps.rst
+F:	Documentation/hwmon/ir35221.rst
+F:	Documentation/hwmon/lm25066.rst
+F:	Documentation/hwmon/ltc2978.rst
+F:	Documentation/hwmon/ltc3815.rst
+F:	Documentation/hwmon/max16064.rst
+F:	Documentation/hwmon/max20751.rst
+F:	Documentation/hwmon/max31785.rst
+F:	Documentation/hwmon/max34440.rst
+F:	Documentation/hwmon/max8688.rst
+F:	Documentation/hwmon/pmbus.rst
+F:	Documentation/hwmon/pmbus-core.rst
+F:	Documentation/hwmon/tps40422.rst
+F:	Documentation/hwmon/ucd9000.rst
+F:	Documentation/hwmon/ucd9200.rst
+F:	Documentation/hwmon/zl6100.rst
 F:	drivers/hwmon/pmbus/
 F:	include/linux/pmbus.h
 
@@ -12613,7 +12613,7 @@ M:	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Supported
 F:	Documentation/devicetree/bindings/hwmon/pwm-fan.txt
-F:	Documentation/hwmon/pwm-fan
+F:	Documentation/hwmon/pwm-fan.rst
 F:	drivers/hwmon/pwm-fan.c
 
 PWM IR Transmitter
@@ -14278,21 +14278,21 @@ SMM665 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/smm665
+F:	Documentation/hwmon/smm665.rst
 F:	drivers/hwmon/smm665.c
 
 SMSC EMC2103 HARDWARE MONITOR DRIVER
 M:	Steve Glendinning <steve.glendinning@shawell.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/emc2103
+F:	Documentation/hwmon/emc2103.rst
 F:	drivers/hwmon/emc2103.c
 
 SMSC SCH5627 HARDWARE MONITOR DRIVER
 M:	Hans de Goede <hdegoede@redhat.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Supported
-F:	Documentation/hwmon/sch5627
+F:	Documentation/hwmon/sch5627.rst
 F:	drivers/hwmon/sch5627.c
 
 SMSC UFX6000 and UFX7000 USB to VGA DRIVER
@@ -14305,7 +14305,7 @@ SMSC47B397 HARDWARE MONITOR DRIVER
 M:	Jean Delvare <jdelvare@suse.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/smsc47b397
+F:	Documentation/hwmon/smsc47b397.rst
 F:	drivers/hwmon/smsc47b397.c
 
 SMSC911x ETHERNET DRIVER
@@ -15650,7 +15650,7 @@ TMP401 HARDWARE MONITOR DRIVER
 M:	Guenter Roeck <linux@roeck-us.net>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/tmp401
+F:	Documentation/hwmon/tmp401.rst
 F:	drivers/hwmon/tmp401.c
 
 TMPFS (SHMEM FILESYSTEM)
@@ -16675,7 +16675,7 @@ VT1211 HARDWARE MONITOR DRIVER
 M:	Juerg Haefliger <juergh@gmail.com>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/vt1211
+F:	Documentation/hwmon/vt1211.rst
 F:	drivers/hwmon/vt1211.c
 
 VT8231 HARDWARE MONITOR DRIVER
@@ -16703,14 +16703,14 @@ W83791D HARDWARE MONITORING DRIVER
 M:	Marc Hulsman <m.hulsman@tudelft.nl>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/w83791d
+F:	Documentation/hwmon/w83791d.rst
 F:	drivers/hwmon/w83791d.c
 
 W83793 HARDWARE MONITORING DRIVER
 M:	Rudolf Marek <r.marek@assembler.cz>
 L:	linux-hwmon at vger.kernel.org
 S:	Maintained
-F:	Documentation/hwmon/w83793
+F:	Documentation/hwmon/w83793.rst
 F:	drivers/hwmon/w83793.c
 
 W83795 HARDWARE MONITORING DRIVER
@@ -16819,7 +16819,7 @@ L:	patches at opensource.cirrus.com
 T:	git https://github.com/CirrusLogic/linux-drivers.git
 W:	https://github.com/CirrusLogic/linux-drivers/wiki
 S:	Supported
-F:	Documentation/hwmon/wm83??
+F:	Documentation/hwmon/wm83??.rst
 F:	Documentation/devicetree/bindings/extcon/extcon-arizona.txt
 F:	Documentation/devicetree/bindings/regulator/arizona-regulator.txt
 F:	Documentation/devicetree/bindings/mfd/arizona.txt
diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
index 6f929bfa9fcd..74c6c95cb657 100644
--- a/drivers/hwmon/Kconfig
+++ b/drivers/hwmon/Kconfig
@@ -17,7 +17,7 @@ menuconfig HWMON
 
 	  To find out which specific driver(s) you need, use the
 	  sensors-detect script from the lm_sensors package.  Read
-	  <file:Documentation/hwmon/userspace-tools> for details.
+	  <file:Documentation/hwmon/userspace-tools.rst> for details.
 
 	  This support can also be built as a module. If so, the module
 	  will be called hwmon.
@@ -59,7 +59,7 @@ config SENSORS_ABITUGURU
 	  chip can be found on Abit uGuru featuring motherboards (most modern
 	  Abit motherboards from before end 2005). For more info and a list
 	  of which motherboards have which revision see
-	  Documentation/hwmon/abituguru
+	  Documentation/hwmon/abituguru.rst
 
 	  This driver can also be built as a module. If so, the module
 	  will be called abituguru.
@@ -73,7 +73,7 @@ config SENSORS_ABITUGURU3
 	  and their settings is supported. The third revision of the Abit
 	  uGuru chip can be found on recent Abit motherboards (since end
 	  2005). For more info and a list of which motherboards have which
-	  revision see Documentation/hwmon/abituguru3
+	  revision see Documentation/hwmon/abituguru3.rst
 
 	  This driver can also be built as a module. If so, the module
 	  will be called abituguru3.
@@ -643,7 +643,7 @@ config SENSORS_CORETEMP
 	help
 	  If you say yes here you get support for the temperature
 	  sensor inside your CPU. Most of the family 6 CPUs
-	  are supported. Check Documentation/hwmon/coretemp for details.
+	  are supported. Check Documentation/hwmon/coretemp.rst for details.
 
 config SENSORS_IT87
 	tristate "ITE IT87xx and compatibles"
diff --git a/drivers/hwmon/ads7828.c b/drivers/hwmon/ads7828.c
index 12c56d3783ed..545b635a104e 100644
--- a/drivers/hwmon/ads7828.c
+++ b/drivers/hwmon/ads7828.c
@@ -8,7 +8,7 @@
  *
  * ADS7830 support, by Guillaume Roguez <guillaume.roguez@savoirfairelinux.com>
  *
- * For further information, see the Documentation/hwmon/ads7828 file.
+ * For further information, see the Documentation/hwmon/ads7828.rst file.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/drivers/hwmon/max197.c b/drivers/hwmon/max197.c
index 3d9e210beedf..dd6a35219a18 100644
--- a/drivers/hwmon/max197.c
+++ b/drivers/hwmon/max197.c
@@ -8,7 +8,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
- * For further information, see the Documentation/hwmon/max197 file.
+ * For further information, see the Documentation/hwmon/max197.rst file.
  */
 
 #include <linux/kernel.h>
diff --git a/drivers/hwmon/sht15.c b/drivers/hwmon/sht15.c
index 39b41e35c2bf..7f4a63959730 100644
--- a/drivers/hwmon/sht15.c
+++ b/drivers/hwmon/sht15.c
@@ -10,7 +10,7 @@
  *
  * Copyright (c) 2007 Wouter Horre
  *
- * For further information, see the Documentation/hwmon/sht15 file.
+ * For further information, see the Documentation/hwmon/sht15.rst file.
  */
 
 #include <linux/interrupt.h>
diff --git a/include/linux/platform_data/ads7828.h b/include/linux/platform_data/ads7828.h
index 3245f45f9d77..a3370a007702 100644
--- a/include/linux/platform_data/ads7828.h
+++ b/include/linux/platform_data/ads7828.h
@@ -4,7 +4,7 @@
  * Copyright (c) 2012 Savoir-faire Linux Inc.
  *          Vivien Didelot <vivien.didelot@savoirfairelinux.com>
  *
- * For further information, see the Documentation/hwmon/ads7828 file.
+ * For further information, see the Documentation/hwmon/ads7828.rst file.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
diff --git a/include/linux/platform_data/ds620.h b/include/linux/platform_data/ds620.h
index 6ef58bb77e46..f0ce22a78bb8 100644
--- a/include/linux/platform_data/ds620.h
+++ b/include/linux/platform_data/ds620.h
@@ -14,7 +14,7 @@ struct ds620_platform_data {
 	 *  1 = PO_LOW
 	 *  2 = PO_HIGH
 	 *
-	 * (see Documentation/hwmon/ds620)
+	 * (see Documentation/hwmon/ds620.rst)
 	 */
 	int pomode;
 };
diff --git a/include/linux/platform_data/ina2xx.h b/include/linux/platform_data/ina2xx.h
index 9f0aa1b48c78..dde59fd3590f 100644
--- a/include/linux/platform_data/ina2xx.h
+++ b/include/linux/platform_data/ina2xx.h
@@ -7,7 +7,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
- * For further information, see the Documentation/hwmon/ina2xx file.
+ * For further information, see the Documentation/hwmon/ina2xx.rst file.
  */
 
 /**
diff --git a/include/linux/platform_data/max197.h b/include/linux/platform_data/max197.h
index 8da8f94ee15c..2bbd0919bc89 100644
--- a/include/linux/platform_data/max197.h
+++ b/include/linux/platform_data/max197.h
@@ -8,7 +8,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  *
- * For further information, see the Documentation/hwmon/max197 file.
+ * For further information, see the Documentation/hwmon/max197.rst file.
  */
 
 #ifndef _PDATA_MAX197_H
diff --git a/include/linux/platform_data/ntc_thermistor.h b/include/linux/platform_data/ntc_thermistor.h
index ee03d429742b..5fa115d3ea4b 100644
--- a/include/linux/platform_data/ntc_thermistor.h
+++ b/include/linux/platform_data/ntc_thermistor.h
@@ -42,7 +42,7 @@ struct ntc_thermistor_platform_data {
 	 * read_uV()
 	 *
 	 * How to setup pullup_ohm, pulldown_ohm, and connect is
-	 * described at Documentation/hwmon/ntc_thermistor
+	 * described at Documentation/hwmon/ntc_thermistor.rst
 	 *
 	 * pullup/down_ohm: 0 for infinite / not-connected
 	 *
-- 
2.20.1


^ permalink raw reply related

* Re: [PATCH v2 10/21] docs: hwmon: aspeed-pwm-tacho: convert to ReST format
From: Andrew Jeffery @ 2019-04-11  0:27 UTC (permalink / raw)
  To: linux-aspeed
In-Reply-To: <2088d3de719397153639c5afdce53b73fe75603a.1554923967.git.mchehab+samsung@kernel.org>



On Thu, 11 Apr 2019, at 04:54, Mauro Carvalho Chehab wrote:
> Convert aspeed-pwm-tacho to ReST format, in order to allow it to
> be parsed by Sphinx.
> 
> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

Acked-by: Andrew Jeffery <andrew@aj.id.au>

> ---
>  Documentation/hwmon/aspeed-pwm-tacho | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/hwmon/aspeed-pwm-tacho 
> b/Documentation/hwmon/aspeed-pwm-tacho
> index 7cfb34977460..6dcec845fbc7 100644
> --- a/Documentation/hwmon/aspeed-pwm-tacho
> +++ b/Documentation/hwmon/aspeed-pwm-tacho
> @@ -15,8 +15,10 @@ controller supports up to 16 tachometer inputs.
>  
>  The driver provides the following sensor accesses in sysfs:
>  
> +=============== ======= =====================================================
>  fanX_input	ro	provide current fan rotation value in RPM as reported
>  			by the fan to the device.
>  
>  pwmX		rw	get or set PWM fan control value. This is an integer
>  			value between 0(off) and 255(full speed).
> +=============== ======= =====================================================
> -- 
> 2.20.1
> 
>

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox