Skip to content

Commit

Permalink
clk: max77686: Combine Maxim max77686 and max77802 driver
Browse files Browse the repository at this point in the history
The clock IP used on the Maxim PMICs max77686 and max77802 are
same. The configuration of clock register is also same except
the number of clocks.

Part of common code utilisation, there is 3 files for these chips
clock driver, one for common and two files for driver registration.

Combine both drivers into single file and move common code into
same common file reduces the 2 files and make max77686 and max77802
clock driver in single fine. This driver does not depends on the
parent driver structure. The regmap handle is acquired through
regmap APIs for the register access.

This combination of driver helps on adding clock driver for different
Maxim PMICs which has similar clock IP like MAX77620 and MAX20024.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
CC: Krzysztof Kozlowski <k.kozlowski@samsung.com>
CC: Javier Martinez Canillas <javier@dowhile0.org>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
  • Loading branch information
Laxman Dewangan authored and Stephen Boyd committed Aug 15, 2016
1 parent d336e9a commit 8ad313f
Show file tree
Hide file tree
Showing 6 changed files with 234 additions and 349 deletions.
15 changes: 2 additions & 13 deletions drivers/clk/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,11 @@ config COMMON_CLK_WM831X

source "drivers/clk/versatile/Kconfig"

config COMMON_CLK_MAX_GEN
bool

config COMMON_CLK_MAX77686
tristate "Clock driver for Maxim 77686 MFD"
depends on MFD_MAX77686
select COMMON_CLK_MAX_GEN
---help---
This driver supports Maxim 77686 crystal oscillator clock.

config COMMON_CLK_MAX77802
tristate "Clock driver for Maxim 77802 PMIC"
tristate "Clock driver for Maxim 77686/77802 MFD"
depends on MFD_MAX77686
select COMMON_CLK_MAX_GEN
---help---
This driver supports Maxim 77802 crystal oscillator clock.
This driver supports Maxim 77686/77802 crystal oscillator clock.

config COMMON_CLK_RK808
tristate "Clock driver for RK808/RK818"
Expand Down
2 changes: 0 additions & 2 deletions drivers/clk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ obj-$(CONFIG_COMMON_CLK_CS2000_CP) += clk-cs2000-cp.o
obj-$(CONFIG_ARCH_EFM32) += clk-efm32gg.o
obj-$(CONFIG_ARCH_HIGHBANK) += clk-highbank.o
obj-$(CONFIG_MACH_LOONGSON32) += clk-ls1x.o
obj-$(CONFIG_COMMON_CLK_MAX_GEN) += clk-max-gen.o
obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o
obj-$(CONFIG_COMMON_CLK_MAX77802) += clk-max77802.o
obj-$(CONFIG_ARCH_MB86S7X) += clk-mb86s7x.o
obj-$(CONFIG_ARCH_MOXART) += clk-moxart.o
obj-$(CONFIG_ARCH_NOMADIK) += clk-nomadik.o
Expand Down
194 changes: 0 additions & 194 deletions drivers/clk/clk-max-gen.c

This file was deleted.

32 changes: 0 additions & 32 deletions drivers/clk/clk-max-gen.h

This file was deleted.

Loading

0 comments on commit 8ad313f

Please sign in to comment.