aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/mt7621-pci-phy (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-06-21staging: mt7621-pci-phy: remove disable clock from the phy exit functionSergio Paracuellos1-8/+0
The clock which has been used here is not about the phy but the pcie port. It has been properly handled into host pcie driver code. Hence, remove it from here which is the correct thing to do. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: mt7621-pci-phy: convert driver to use kernel regmap API'sSergio Paracuellos1-34/+54
Instead of using writel and readl use regmap API which makes the driver maintainability easier. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: mt7621-pci-phy: add quirks for 'E2' revision using 'soc_device_attribute'Sergio Paracuellos1-3/+14
Depending on revision of the chip, 'mt7621_bypass_pipe_rst' function must be executed. Add better support for this using 'soc_device_match' in driver probe function. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: mt7621-pci-phy: remove some unnecessary local variablesSergio Paracuellos1-12/+4
Device tree is not using child nodes anymore so the 'child_np' variable can safely removed. This also simplifies the error path to be able to directly return errors removing also the 'ret' variable. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-19staging: mt7621-pci-phy: use 'platform_get_resource'Sergio Paracuellos1-6/+5
Driver is using 'of_address_to_resource' to get memory resources. Make use of 'platform_get_resource' instead which is more accurate for a platform driver. This also makes possible to delete a local variable which is not needed anymore. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-16staging: mt7621-pci-phy: prevent use of uninitialized variableAntti Keränen1-1/+1
Do not use uninitialized variable 'port' when printing an error message Signed-off-by: Antti Keränen <detegr@gmail.com> Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: add missing SPDX lines to Makefile filesGreg Kroah-Hartman1-0/+1
There are a few remaining drivers/staging/*/Makefile files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: add missing SPDX lines to Kconfig filesGreg Kroah-Hartman1-0/+1
There are a few remaining drivers/staging/*/Kconfig files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-29staging: mt7621-pci-phy: change driver to don't use child nodesSergio Paracuellos1-6/+20
Device tree has been simplified to don't use child nodes and use the #phy-cells property instead. Change the driver accordly implementing custom 'xlate' function to return the correct phy for each port. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-29staging: mt7621-pci-phy: update bindings documentationSergio Paracuellos1-35/+9
Device tree has been simplified to use phy-cells instead of using child nodes. Update documentation accordly. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-19staging: mt7621-pci-phy: Add Spaces to Macro DefinitionEmanuel Bennici1-63/+63
Improve Code readability by adding Tabs and Spaces after #define Signed-off-by: Emanuel Bennici <benniciemanuel78@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-19staging: mt7621-pci-phy: use 'module_init' instead of 'arch_initcall'Sergio Paracuellos1-1/+1
Init driver as 'arch_initcall()' does not work. It causes phy_create() to be called before the phy module is initialized, so 'phy_class' is NULL, the new phy isn't placed in the right class, and it cannot be found. Change to 'module_init()' which works properly in this case. Fixes: 00981d31d6df: staging: mt7621-pci-phy: add new driver for phy part of mt7621-pci Reported-by: NeilBrown <neil@brown.name> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-18staging: Mediatek: Use individual config flags in MakefileGeorge Hilliard1-1/+1
These drivers can be useful on other MT76xx SoCs, which have compatible peripherals. The drivers were selectable in Kconfig, but they were quietly excluded from the build because the SOC_MT7621 chip was not selected. So, make the Makefiles use the same flags as Kconfig for these drivers. mt7621-dma and mt7621-dts are left alone because they truly do require that SoC. I have personally confirmed that the mt7621-spi driver works on the MT7688, which was what prompted this change. Cc: linux-kernel@vger.kernel.org Cc: devel@driverdev.osuosl.org Cc: NeilBrown <neil@brown.name> Cc: sergio.paracuellos@gmail.com Signed-off-by: George Hilliard <thirtythreeforty@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-07staging: mt7621-pci-phy: dt-bindings: add bindings for Mediatek MT7621 Pcie PHYSergio Paracuellos1-0/+54
Add bindings documentation for PCie PHY of Mediatek MT7621. This file will be moved into its appropiate documentation bindings'place when this driver is mainlined. CC: Device Tree mailing list <devicetree@vger.kernel.org> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-07staging: mt7621-pci-phy: add new driver for phy part of mt7621-pciSergio Paracuellos4-0/+399
Phy part of the pci for this SoC can be handled using a generic phy driver. This commit extracts phy part of the mt7621-pci into a new 'mt7621-pci-phy' driver. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>