Re: [PATCH v3 5/6] Add a V4L2 driver for SI476X MFD

2012-11-23 Thread Andrey Smirnov
On 11/16/2012 07:02 AM, Hans Verkuil wrote: > Hi Andrey, > > Some more comments... > > On Tue October 23 2012 20:44:31 Andrey Smirnov wrote: >> This commit adds a driver that exposes all the radio related >> functionality of the Si476x series of chips via the V4L2 sub

[PATCH 1/3] [regmap] [RESEND] Add provisions to have user-defined read operation

2013-01-12 Thread Andrey Smirnov
This commit is a preparatory commit to provide "no-bus" configuration option for regmap API. It adds necessary plumbing needed to have the ability to provide user define register read function. Signed-off-by: Andrey Smirnov --- drivers/base/regmap/internal.h |2 ++ drivers/b

[PATCH 3/3] [regmap] [RESEND] Add "no-bus" option for regmap API

2013-01-12 Thread Andrey Smirnov
r devices that expose registers but whose register access sequence does not fit the 'bus' abstraction. Signed-off-by: Andrey Smirnov --- drivers/base/regmap/internal.h |2 ++ drivers/base/regmap/regmap.c | 52 ++-- include/linux/regmap.h

[PATCH 2/3] [regmap] [RESEND] Add provisions to have user-defined write operation

2013-01-12 Thread Andrey Smirnov
This commit is a preparatory commit to provide "no-bus" configuration option for regmap API. It adds necessary plumbing needed to have the ability to provide user define register write function. Signed-off-by: Andrey Smirnov --- drivers/base/regmap/internal.h |1 + drivers/b

[PATCH 0/3] [regmap] [RESEND] Add "no-bus" configuration for regmap API

2013-01-12 Thread Andrey Smirnov
ave "void *context" as a first argument in all the patches - Minor improvements in documentation Andrey Smirnov (3): Add provisions to have user-defined read operation Add provisions to have user-defined write operation Add "no-bus" option for regmap API drivers/bas

Re: [PATCH 3/3] [regmap] [RESEND] Add "no-bus" option for regmap API

2013-01-14 Thread Andrey Smirnov
On Sun, Jan 13, 2013 at 3:18 PM, Mark Brown wrote: > On Sat, Jan 12, 2013 at 12:54:14PM -0800, Andrey Smirnov wrote: > >> + bool cache_registers; >> + > > I'm afraid I don't quite understand this... > >> - if (!map->cache_bypass &a

Re: [PATCH 1/2] mtd: nand: BUG_ON in case of no select_chip and cmd_ctrl

2016-07-19 Thread Andrey Smirnov
On Tue, Jul 19, 2016 at 9:22 AM, Richard Weinberger wrote: > Am 19.07.2016 um 18:12 schrieb Boris Brezillon: Not sure a BUG_ON() is worst than a NULL-pointer exception ;-). >>> >>> When this really just triggers a NULL-pointer exception, we don't need a >>> BUG_ON or WARN_ON at >>> all since

Re: [PATCH 1/2] mtd: nand: BUG_ON in case of no select_chip and cmd_ctrl

2016-07-19 Thread Andrey Smirnov
On Tue, Jul 19, 2016 at 11:23 AM, Brian Norris wrote: > On Tue, Jul 19, 2016 at 08:16:11PM +0200, Boris Brezillon wrote: >> On Tue, 19 Jul 2016 11:11:54 -0700 >> Andrey Smirnov wrote: >> >> > On Tue, Jul 19, 2016 at 9:22 AM, Richard Weinberger wrote: >> >

Re: [PATCH 2/2] mtd: nand: Get rid of needless 'goto'

2016-07-19 Thread Andrey Smirnov
On Tue, Jul 19, 2016 at 11:30 AM, Brian Norris wrote: > On Tue, Jul 19, 2016 at 08:41:44AM -0700, Andrey Smirnov wrote: >> Using "goto" in that "switch" statement only makes it harder to follow >> control flow and doesn't bring any advantages.

Re: [PATCH 03/13] RTC: ds1307: Add DS1341 specific power-saving options

2016-07-19 Thread Andrey Smirnov
On Tue, Jul 19, 2016 at 3:47 PM, Alexandre Belloni wrote: > On 21/06/2016 at 19:34:56 -0700, Andrey Smirnov wrote : >> On Tue, Jun 21, 2016 at 2:07 PM, Alexandre Belloni >> wrote: >> > On 21/06/2016 at 15:49:04 -0500, Rob Herring wrote : >> >> So wouldn'

[PATCH v2 1/2] mtd: nand: Error out if cmd_ctrl() is missing

2016-07-19 Thread Andrey Smirnov
) will result in a bit cryptic segfault. Same is true for chip->cmdfunc(). To avoid the above scenario change the prototype of nand_set_defaults() to return error code, all the callers to check for it and error out if cmd_ctrl() is not provided. Suggested-by: Brian Norris Signed-off-by: Andre

[PATCH v2 2/2] mtd: nand: Get rid of needless 'goto'

2016-07-19 Thread Andrey Smirnov
Using "goto" and "switch" statement only makes it harder to follow control flow and doesn't bring any advantages. Rewrite the code to avoid using "goto". Signed-off-by: Brian Norris Signed-off-by: Andrey Smirnov --- drivers/mtd/nand/nand_base.c | 18 ++

Re: [PATCH 03/13] RTC: ds1307: Add DS1341 specific power-saving options

2016-07-20 Thread Andrey Smirnov
On Wed, Jul 20, 2016 at 2:02 AM, Alexandre Belloni wrote: > On 19/07/2016 at 16:56:56 -0700, Andrey Smirnov wrote : >> >> I don't see any value in doing that, could you give me a realistic >> >> example of a scenario in which a user would want to spend some of

Re: [PATCH 03/13] RTC: ds1307: Add DS1341 specific power-saving options

2016-07-20 Thread Andrey Smirnov
On Wed, Jul 20, 2016 at 8:38 AM, Alexandre Belloni wrote: > On 20/07/2016 at 07:36:55 -0700, Andrey Smirnov wrote : >> On Wed, Jul 20, 2016 at 2:02 AM, Alexandre Belloni >> wrote: >> > On 19/07/2016 at 16:56:56 -0700, Andrey Smirnov wrote : >> >> >> I do

Re: [PATCH v2 1/2] mtd: nand: Error out if cmd_ctrl() is missing

2016-07-20 Thread Andrey Smirnov
On Tue, Jul 19, 2016 at 11:44 PM, Boris Brezillon wrote: > On Tue, 19 Jul 2016 22:33:57 -0700 > Andrey Smirnov wrote: > >> If no user specified chip->select_chip() function is provided, code in >> nand_base.c will automatically set this hook to nand_select_chip(), >

[PATCH] Kconfig: nand: Remove redundant dependency on MTD_NAND

2016-07-21 Thread Andrey Smirnov
Config MTD_NAND_FSL_IFC is already located inside 'if MTD_NAND' statment, so there's no need to explicitly specify it as a dependency. Signed-off-by: Andrey Smirnov --- drivers/mtd/nand/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd

[PATCH] Kconfig: nand: Make MTD_NAND_FSL_ELBC depend on FSL_SOC

2016-07-21 Thread Andrey Smirnov
SOC) when doing make ARCH=powerpc \ CROSS_COMPILE=powerpc-e500v2-linux-gnuspe- \ allmodconfig" Changing dependency to FSL_SOC fixes that. Signed-off-by: Andrey Smirnov --- drivers/mtd/nand/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH v3 2/2] mtd: nand: Get rid of needless 'goto'

2016-07-21 Thread Andrey Smirnov
Using "goto" and "switch" statement only makes it harder to follow control flow and doesn't bring any advantages. Rewrite the code to avoid using "goto". Signed-off-by: Brian Norris Signed-off-by: Andrey Smirnov --- No changes since v2. drivers/mtd/nand/nan

[PATCH v3 1/2] mtd: nand: Error out if cmd_ctrl() is missing

2016-07-21 Thread Andrey Smirnov
) will result in a bit cryptic segfault. Same is true for chip->cmdfunc(). To avoid the above scenario add a check in nand_scan_dent and error out if cmd_ctrl() is not provided. Suggested-by: Boris Brezillon Suggested-by: Brian Norris Signed-off-by: Andrey Smirnov --- Changes since v2:

[PATCH] dma-mapping.h: Preserve unmap info for CONFIG_DMA_API_DEBUG

2016-09-20 Thread Andrey Smirnov
pped areas never being unmapped. Signed-off-by: Andrey Smirnov --- include/linux/dma-mapping.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 71c1b21..41c9875 100644 --- a/include/linux/dma-mapping.h +++ b/include

[PATCH] Documentation: DMA-API-HOWTO: Fix a typo

2016-09-20 Thread Andrey Smirnov
Fix a type in example variable name. Signed-off-by: Andrey Smirnov --- Documentation/DMA-API-HOWTO.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/DMA-API-HOWTO.txt b/Documentation/DMA-API-HOWTO.txt index 781024e..d08a56a 100644 --- a/Documentation/DMA-API

[PATCH v2 00/17] DS1341 support and code cleanup

2016-06-21 Thread Andrey Smirnov
rtctest.c, are added to the patchset Any feedback is appreciated. Thank you, Andrey Smirnov Andrey Smirnov (17): RTC: ds1307: Add DS1341 variant RTC: ds1307: Disable square wave and timers as default RTC: ds1307: Add devicetree bindings for DS1341 RTC: ds1307: Add DS1341 specific power

[PATCH v2 00/17] DS1341 support and code cleanup

2016-06-21 Thread Andrey Smirnov
rtctest.c, are added to the patchset Any feedback is appreciated. Thank you, Andrey Smirnov Andrey Smirnov (17): RTC: ds1307: Add DS1341 variant RTC: ds1307: Disable square wave and timers as default RTC: ds1307: Add devicetree bindings for DS1341 RTC: ds1307: Add DS1341 specific power

[PATCH v2 04/17] RTC: ds1307: Add DS1341 specific power-saving options

2016-06-21 Thread Andrey Smirnov
Add DS1341 specific power-saving options that allow to disable certain functional aspects of the chip in order to minimize its power consumption. Signed-off-by: Andrey Smirnov --- drivers/rtc/rtc-ds1307.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers

[PATCH v2 06/17] RTC: ds1307: Convert want_irq into a predicate

2016-06-21 Thread Andrey Smirnov
Convert want_irq variable into a predicate in order to detangle various independent chunks of ds1307_probe(). Signed-off-by: Andrey Smirnov --- drivers/rtc/rtc-ds1307.c | 44 +--- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/drivers/rtc

[PATCH v2 10/17] RTC: ds1307: Constify struct ds1307 where possible

2016-06-21 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/rtc/rtc-ds1307.c | 50 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 66e7168..67907f1 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b

[PATCH v2 11/17] RTC: ds1307: Convert goto to a loop

2016-06-21 Thread Andrey Smirnov
Convert goto to a loop and set a hard upper limit on the number of times driver would try to make RTC work (as opposed to having an infinite retry loop). Signed-off-by: Andrey Smirnov --- drivers/rtc/rtc-ds1307.c | 151 +-- 1 file changed, 82

[PATCH v2 02/17] RTC: ds1307: Disable square wave and timers as default

2016-06-21 Thread Andrey Smirnov
configured it to produce square wave and left it in such a state. Signed-off-by: Andrey Smirnov --- drivers/rtc/rtc-ds1307.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 7e65e2e..c618c22 100644 --- a/drivers/rtc

[PATCH v2 08/17] RTC: ds1307: Move chip sanity checking into a separate routine

2016-06-21 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/rtc/rtc-ds1307.c | 148 +-- 1 file changed, 79 insertions(+), 69 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 4fa09dc..d262db5 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b

[PATCH v2 15/17] RTC: rtctest: Change alarm IRQ support detection

2016-06-21 Thread Andrey Smirnov
IRQ emulation code since that codpath expects EINVAL c) Would break test's logic for feature support detection in the case of RTC_UIE_ON ioctl Signed-off-by: Andrey Smirnov --- tools/testing/selftests/timers/rtctest.c | 9 - 1 file changed, 8 insertions(+)

[PATCH v2 12/17] RTC: ds1307: Redefine RX8025_REG_* to minimize extra code

2016-06-21 Thread Andrey Smirnov
The only place in the driver where RX8025_REG_* are used they are always shifted and ORed the same way, so instead of repeating that idiom make it a part of symbolic constant. Signed-off-by: Andrey Smirnov --- drivers/rtc/rtc-ds1307.c | 18 ++ 1 file changed, 10 insertions(+), 8

[PATCH v2 05/17] RTC: ds1307: Convert ds1307_can_wakeup_device into a predicate

2016-06-21 Thread Andrey Smirnov
Convert ds1307_can_wakeup_device in ds1307_probe into a predicate in order to make various chunks of code in that function less connected to each other. Signed-off-by: Andrey Smirnov --- drivers/rtc/rtc-ds1307.c | 35 ++- 1 file changed, 18 insertions(+), 17

[PATCH v2 03/17] RTC: ds1307: Add devicetree bindings for DS1341

2016-06-21 Thread Andrey Smirnov
Add devicetree bindings for DS1341 that allow to control settings affecting power consumption of the chip. Signed-off-by: Andrey Smirnov --- .../devicetree/bindings/rtc/dallas,ds1341.txt | 23 ++ 1 file changed, 23 insertions(+) create mode 100644 Documentation

[PATCH v2 13/17] RTC: ds1307: Report oscillator problems more intelligently

2016-06-21 Thread Andrey Smirnov
Report oscillator problems more intelligently, by printing more information about what cause the issue and not yelling "SET TIME!" at the user. Signed-off-by: Andrey Smirnov --- drivers/rtc/rtc-ds1307.c | 28 +++- 1 file changed, 23 insertions(+), 5 deletion

[PATCH v2 16/17] RTC: rtctest: Change no IRQ detection for RTC_IRQP_READ

2016-06-21 Thread Andrey Smirnov
A call to ioctl(..., RTC_IRQP_READ, ...) should never result in ENOTTY. All new style RTC drivers implement it and all of the old style drivers return EINVAL when they don't support periodic IRQs. Signed-off-by: Andrey Smirnov --- tools/testing/selftests/timers/rtctest.c | 2 +- 1 file ch

[PATCH v2 17/17] RTC: rtctest: Change no IRQ detection for RTC_IRQP_SET

2016-06-21 Thread Andrey Smirnov
A call to ioctl(..., RTC_IRQP_SET, ...) should never result in ENOTTY. All new style RTC drivers implement it and all of the old style drivers return EINVAL when they don't support periodic IRQs. Signed-off-by: Andrey Smirnov --- tools/testing/selftests/timers/rtctest.c | 2 +- 1 file ch

[PATCH v2 07/17] RTC: ds1307: Move chip configuration into a separate routine

2016-06-21 Thread Andrey Smirnov
Move chip configuration into a separate routine to improve readablity of the code. Signed-off-by: Andrey Smirnov --- drivers/rtc/rtc-ds1307.c | 172 ++- 1 file changed, 97 insertions(+), 75 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers

[PATCH v2 14/17] RTC: ds1307: Move last bits of sanity checking out of chip_configure

2016-06-21 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/rtc/rtc-ds1307.c | 106 ++- 1 file changed, 59 insertions(+), 47 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 2169e5b..45b2adb 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b

[PATCH v2 09/17] RTC: ds1307: Remove register "cache"

2016-06-21 Thread Andrey Smirnov
ing (there were a number of functions that defined a convenience variable pointing to ds1307->regs, but failed to use it in the code consistently). Signed-off-by: Andrey Smirnov --- drivers/rtc/rtc-ds1307.c | 229 --- 1 file changed, 116 inser

[PATCH v2 01/17] RTC: ds1307: Add DS1341 variant

2016-06-21 Thread Andrey Smirnov
Signed-off-by: Andrey Smirnov --- drivers/rtc/rtc-ds1307.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c index 821d9c0..7e65e2e 100644 --- a/drivers/rtc/rtc-ds1307.c +++ b/drivers/rtc/rtc-ds1307.c @@ -35,6 +35,7 @@ enum ds_type

Re: [PATCH v2 13/17] RTC: ds1307: Report oscillator problems more intelligently

2016-06-21 Thread Andrey Smirnov
On Tue, Jun 21, 2016 at 2:22 PM, Alexandre Belloni wrote: > On 21/06/2016 at 00:22:46 -0700, Andrey Smirnov wrote : >> Report oscillator problems more intelligently, by printing more >> information about what cause the issue and not yelling "SET TIME!" at >> the us

Re: [PATCH 03/13] RTC: ds1307: Add DS1341 specific power-saving options

2016-06-21 Thread Andrey Smirnov
> So wouldn't you want to set one mode while running and the lower power > mode while suspended? I'm trying to understand the frequency of changing > this. If it is always one setting for a board, then yes it belongs in > DT. If it is a user decision, then it probably shouldn't be in DT. I don't r

Re: [PATCH v2 02/17] RTC: ds1307: Disable square wave and timers as default

2016-06-21 Thread Andrey Smirnov
On Tue, Jun 21, 2016 at 2:17 PM, Alexandre Belloni wrote: > On 21/06/2016 at 00:22:35 -0700, Andrey Smirnov wrote : >> Disable square wave and timers as default for DS1337/39/41 and >> DS3231. The rationale being that configuring a chip this way puts it >> into a known s

Re: [PATCH v2 00/17] DS1341 support and code cleanup

2016-06-21 Thread Andrey Smirnov
>> >> Andrey Smirnov (17): >> RTC: ds1307: Add DS1341 variant >> RTC: ds1307: Disable square wave and timers as default >> RTC: ds1307: Add devicetree bindings for DS1341 >> RTC: ds1307: Add DS1341 specific power-saving options >> RTC: ds130

Re: [PATCH v2 01/17] RTC: ds1307: Add DS1341 variant

2016-06-21 Thread Andrey Smirnov
On Tue, Jun 21, 2016 at 2:26 PM, Alexandre Belloni wrote: > Please always include a commit message. OK, will fix in v3 > > On 21/06/2016 at 00:20:50 -0700, Andrey Smirnov wrote : >> Signed-off-by: Andrey Smirnov >> --- >> drivers/rtc/rtc-ds1307.c | 5 + >&

Re: [PATCH 03/13] RTC: ds1307: Add DS1341 specific power-saving options

2016-06-21 Thread Andrey Smirnov
On Tue, Jun 21, 2016 at 2:07 PM, Alexandre Belloni wrote: > On 21/06/2016 at 15:49:04 -0500, Rob Herring wrote : >> So wouldn't you want to set one mode while running and the lower power >> mode while suspended? I'm trying to understand the frequency of changing >> this. If it is always one settin

[PATCH v2 2/3] powerpc: Call chained reset handlers during reset

2016-07-28 Thread Andrey Smirnov
Call out to all restart handlers that were added via register_restart_handler() API when restarting the machine. Signed-off-by: Andrey Smirnov --- No changes compared to v1 arch/powerpc/kernel/setup-common.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/kernel/setup

[PATCH v2 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler

2016-07-28 Thread Andrey Smirnov
Convert fsl_rstcr_restart into a function to be registered with register_reset_handler(). Signed-off-by: Andrey Smirnov --- Changes since v1: - fsl_rstcr_restart is registered as a reset handler in setup_rstcr, replacing per-board arch_initcall approach arch/powerpc

[PATCH v2 1/3] powerpc: Factor out common code in setup-common.c

2016-07-28 Thread Andrey Smirnov
Factor out a small bit of common code in machine_restart(), machine_power_off() and machine_halt(). Signed-off-by: Andrey Smirnov --- No changes compared to v1. arch/powerpc/kernel/setup-common.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/arch

[RESEND PATCH 2/2] ARM: cache-l2x0.c: Do not clear bit 23 in prefetch control register

2016-07-28 Thread Andrey Smirnov
.jsp?topic=/com.arm.doc.ddi0246e/CJAJACBJ.html Acked-by: Arnd Bergmann Signed-off-by: Andrey Smirnov --- arch/arm/mm/cache-l2x0.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 30e2012..12c1ba7 100644 --- a/a

[RESEND PATCH 1/2] ARM: cache-l2x0.c: Replace magic numbers

2016-07-28 Thread Andrey Smirnov
Replace magic numbers used for L310 Prefetch Control Register Acked-by: Arnd Bergmann Signed-off-by: Andrey Smirnov --- arch/arm/mm/cache-l2x0.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c index 9f9d542..30e2012

[PATCH] mfd: syscon: Make use of of_iomap

2016-08-07 Thread Andrey Smirnov
Use of_iomap instead of explicitly calling of_address_to_resource() and ioremap(). Signed-off-by: Andrey Smirnov --- drivers/mfd/syscon.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c index 2f2225e..55b883d 100644 --- a

Re: [RESEND PATCH v7 1/1] platform: Add driver for RAVE Supervisory Processor

2017-10-16 Thread Andrey Smirnov
On Mon, Oct 16, 2017 at 7:14 AM, Johan Hovold wrote: > On Fri, Oct 13, 2017 at 08:56:00AM -0700, Andrey Smirnov wrote: >> On Fri, Oct 13, 2017 at 12:27 AM, Johan Hovold wrote: >> > On Thu, Oct 12, 2017 at 11:13:21PM -0700, Andrey Smirnov wrote: >> >> Add a driver

Re: [PATCH v2] watchdog: core: Make use of devm_register_reboot_notifier()

2017-10-17 Thread Andrey Smirnov
On Sat, Apr 15, 2017 at 11:11 PM, Guenter Roeck wrote: > On 04/11/2017 09:06 AM, Andrey Smirnov wrote: >> >> Save a bit of cleanup code by leveraging newly added >> devm_register_reboot_notifier(). >> >> Cc: cphe...@gmail.com >> Cc: linux-kernel@vger.ke

[RFC, PATCH] imx: serial: Take tty->files_lock opportunistically

2017-05-30 Thread Andrey Smirnov
cphe...@gmail.com Cc: Peter Senna Tschudin Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-kernel@vger.kernel.org Signed-off-by: Andrey Smirnov --- Not sure if this is the best way to solve the problem (hence the RFC tag). If anyone has a better idea, or if there's a better fix for th

Re: [v9,4/5] watchdog: Add RAVE SP watchdog driver

2017-10-31 Thread Andrey Smirnov
On Sat, Oct 28, 2017 at 9:14 AM, Guenter Roeck wrote: > On Wed, Oct 25, 2017 at 12:04:20PM -0700, Andrey Smirnov wrote: >> This driver provides access to RAVE SP watchdog functionality. >> >> Cc: linux-kernel@vger.kernel.org >> Cc: linux-watch...@vger.kernel.org >

[PATCH v10 2/5] serdev: Introduce devm_serdev_device_open()

2017-10-31 Thread Andrey Smirnov
rring Cc: cphe...@gmail.com Cc: Guenter Roeck Cc: Lucas Stach Cc: Nikita Yushchenko Cc: Lee Jones Cc: Greg Kroah-Hartman Cc: Pavel Machek Cc: Andy Shevchenko Cc: Johan Hovold Cc: Sebastian Reichel Reviewed-by: Sebastian Reichel Reviewed-by: Guenter Roeck Signed-off-by: Andrey Smirnov --- Docum

[PATCH v10 4/5] watchdog: Add RAVE SP watchdog driver

2017-10-31 Thread Andrey Smirnov
Herring Cc: Johan Hovold Cc: Sebastian Reichel Signed-off-by: Nikita Yushchenko Signed-off-by: Andrey Smirnov --- drivers/watchdog/Kconfig | 7 + drivers/watchdog/Makefile | 1 + drivers/watchdog/rave-sp-wdt.c | 349 + 3 files changed

[PATCH v10 5/5] dt-bindings: watchdog: Add bindings for RAVE SP watchdog driver

2017-10-31 Thread Andrey Smirnov
Stach Cc: Nikita Yushchenko Cc: Lee Jones Cc: Greg Kroah-Hartman Cc: Pavel Machek Cc: Andy Shevchenko Cc: Guenter Roeck Cc: Rob Herring Cc: Johan Hovold Cc: Mark Rutland Cc: Sebastian Reichel Acked-by: Rob Herring Signed-off-by: Nikita Yushchenko Signed-off-by: Andrey Smirnov

[PATCH v10 3/5] mfd: Add driver for RAVE Supervisory Processor

2017-10-31 Thread Andrey Smirnov
-by: Chris Healy Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Signed-off-by: Andrey Smirnov --- drivers/mfd/Kconfig | 9 + drivers/mfd/Makefile | 2 + drivers/mfd/rave-sp.c| 659 +++ drivers/platform/Kconfig | 1 + include

[PATCH v10 1/5] serdev: Make .remove in struct serdev_device_driver optional

2017-10-31 Thread Andrey Smirnov
enter Roeck Cc: Lucas Stach Cc: Nikita Yushchenko Cc: Lee Jones Cc: Greg Kroah-Hartman Cc: Pavel Machek Cc: Andy Shevchenko Cc: Johan Hovold Cc: Sebastian Reichel Reviewed-by: Sebastian Reichel Reviewed-by: Guenter Roeck Signed-off-by: Andrey Smirnov --- drivers/tty/serdev/core.c | 4 ++-- 1

[PATCH v10 0/5] ZII RAVE platform driver

2017-10-31 Thread Andrey Smirnov
;s Acked-by for patch 2/2 Feedback is greatly appreciated! Thanks, Andrey Smirnov [v9] lkml.kernel.org/r/20171025190421.18415-1-andrew.smir...@gmail.com [v8] lkml.kernel.org/r/20171018170136.12347-1-andrew.smir...@gmail.com [v7] lkml.kernel.org/r/20171013061321.31252-2-andrew.smir...@gmail.com [v6] lk

Re: [RESEND PATCH v7 1/1] platform: Add driver for RAVE Supervisory Processor

2017-10-24 Thread Andrey Smirnov
On Tue, Oct 24, 2017 at 3:28 AM, Lee Jones wrote: > On Fri, 13 Oct 2017, Andrey Smirnov wrote: > >> On Fri, Oct 13, 2017 at 9:17 AM, Lee Jones wrote: >> > On Fri, 13 Oct 2017, Andrey Smirnov wrote: >> > >> >> On Fri, Oct 13, 2017 at 12:27 AM, Johan Hovo

Re: [RESEND PATCH v7 1/1] platform: Add driver for RAVE Supervisory Processor

2017-10-24 Thread Andrey Smirnov
was added to "drivers/platform" to a degree and contains a link to original submission: https://marc.info/?l=linux-kernel&m=149677241805627&w=2 Granted it is not completely effortless to get to all of that, but I don't think it is fair to say that all of that was not documented. Andrey Smirnov

Re: [PATCH v8 5/5] dt-bindings: watchdog: Add bindings for RAVE SP watchdog driver

2017-10-25 Thread Andrey Smirnov
On Tue, Oct 24, 2017 at 12:07 PM, Rob Herring wrote: > On Wed, Oct 18, 2017 at 10:01:36AM -0700, Andrey Smirnov wrote: > > Commit msg? > OK, will add in v9. >> Cc: linux-kernel@vger.kernel.org >> Cc: devicet...@vger.kernel.org >> Cc: linux-watch...@vger.kernel.org

[PATCH v9 4/5] watchdog: Add RAVE SP watchdog driver

2017-10-25 Thread Andrey Smirnov
Herring Cc: Johan Hovold Signed-off-by: Nikita Yushchenko Signed-off-by: Andrey Smirnov --- Guenter: In our previous discussion you noted that relying on the state of WDOG_HW_RUNNING was not correct (that should be fixed now), please let me know if using watchdog_hw_running() the way I do in

[PATCH v9 2/5] serdev: Introduce devm_serdev_device_open()

2017-10-25 Thread Andrey Smirnov
rring Cc: cphe...@gmail.com Cc: Guenter Roeck Cc: Lucas Stach Cc: Nikita Yushchenko Cc: Lee Jones Cc: Greg Kroah-Hartman Cc: Pavel Machek Cc: Andy Shevchenko Cc: Johan Hovold Reviewed-by: Guenter Roeck Signed-off-by: Andrey Smirnov --- Documentation/driver-model/devres.txt | 3 +++ drivers/tt

[PATCH v9 1/5] serdev: Make .remove in struct serdev_device_driver optional

2017-10-25 Thread Andrey Smirnov
enter Roeck Cc: Lucas Stach Cc: Nikita Yushchenko Cc: Lee Jones Cc: Greg Kroah-Hartman Cc: Pavel Machek Cc: Andy Shevchenko Cc: Johan Hovold Reviewed-by: Guenter Roeck Signed-off-by: Andrey Smirnov --- drivers/tty/serdev/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --

[PATCH v9 0/5] ZII RAVE platform driver

2017-10-25 Thread Andrey Smirnov
orporated feedback from Andy Shevchenko Changes since [v1]: - Updated wording in DT-bindings as per Rob's request. - Collected Rob's Acked-by for patch 2/2 Feedback is greatly appreciated! Thanks, Andrey Smirnov [v8] lkml.kernel.org/r/20171018170136.12347-1-andrew.sm

[PATCH v9 5/5] dt-bindings: watchdog: Add bindings for RAVE SP watchdog driver

2017-10-25 Thread Andrey Smirnov
Stach Cc: Nikita Yushchenko Cc: Lee Jones Cc: Greg Kroah-Hartman Cc: Pavel Machek Cc: Andy Shevchenko Cc: Guenter Roeck Cc: Rob Herring Cc: Johan Hovold Cc: Mark Rutland Signed-off-by: Nikita Yushchenko Signed-off-by: Andrey Smirnov --- .../bindings/watchdog/zii,rave-sp-wdt.txt

[PATCH v9 3/5] mfd: Add driver for RAVE Supervisory Processor

2017-10-25 Thread Andrey Smirnov
Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Signed-off-by: Andrey Smirnov --- drivers/mfd/Kconfig | 9 + drivers/mfd/Makefile | 2 + drivers/mfd/rave-sp.c| 659 +++ drivers/platform/Kconfig | 1 + include/linux/rave-sp.h | 54

Re: [PATCH v10 4/5] watchdog: Add RAVE SP watchdog driver

2017-11-05 Thread Andrey Smirnov
On Sun, Nov 5, 2017 at 7:47 AM, Johan Hovold wrote: > On Tue, Oct 31, 2017 at 09:36:55AM -0700, Andrey Smirnov wrote: >> This driver provides access to RAVE SP watchdog functionality. >> >> Cc: linux-kernel@vger.kernel.org >> Cc: linux-watch...@vger.kernel.org >

Re: [PATCH v10 3/5] mfd: Add driver for RAVE Supervisory Processor

2017-11-05 Thread Andrey Smirnov
On Sun, Nov 5, 2017 at 7:38 AM, Johan Hovold wrote: > On Tue, Oct 31, 2017 at 09:36:54AM -0700, Andrey Smirnov wrote: >> Add a driver for RAVE Supervisory Processor, an MCU implementing >> various bits of housekeeping functionality (watchdoging, backlight >> control, LED

Re: [PATCH v10 2/5] serdev: Introduce devm_serdev_device_open()

2017-11-05 Thread Andrey Smirnov
On Sun, Nov 5, 2017 at 7:38 AM, Johan Hovold wrote: > On Tue, Oct 31, 2017 at 09:36:53AM -0700, Andrey Smirnov wrote: >> Add code implementing managed version of serdev_device_open() for >> serdev device drivers that "open" the device during driver's lifecycle >&

[PATCH v11 2/5] serdev: Introduce devm_serdev_device_open()

2017-11-06 Thread Andrey Smirnov
rring Cc: cphe...@gmail.com Cc: Guenter Roeck Cc: Lucas Stach Cc: Nikita Yushchenko Cc: Lee Jones Cc: Greg Kroah-Hartman Cc: Pavel Machek Cc: Andy Shevchenko Cc: Johan Hovold Cc: Sebastian Reichel Acked-by: Rob Herring Reviewed-by: Sebastian Reichel Reviewed-by: Guenter Roeck Signed-off-by:

[PATCH v11 5/5] dt-bindings: watchdog: Add bindings for RAVE SP watchdog driver

2017-11-06 Thread Andrey Smirnov
: Andrey Smirnov --- .../bindings/watchdog/zii,rave-sp-wdt.txt | 39 ++ 1 file changed, 39 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/zii,rave-sp-wdt.txt diff --git a/Documentation/devicetree/bindings/watchdog/zii,rave-sp-wdt.txt b

[PATCH v11 0/5] ZII RAVE platform driver

2017-11-06 Thread Andrey Smirnov
boot_source() revealed by further testing of the code - Incorporated feedback from Andy Shevchenko Changes since [v1]: - Updated wording in DT-bindings as per Rob's request. - Collected Rob's Acked-by for patch 2/2 Feedback is greatly appreciated! Thanks, Andrey Smirnov [

[PATCH v11 1/5] serdev: Make .remove in struct serdev_device_driver optional

2017-11-06 Thread Andrey Smirnov
enter Roeck Cc: Lucas Stach Cc: Nikita Yushchenko Cc: Lee Jones Cc: Greg Kroah-Hartman Cc: Pavel Machek Cc: Andy Shevchenko Cc: Johan Hovold Cc: Sebastian Reichel Acked-by: Rob Herring Reviewed-by: Sebastian Reichel Reviewed-by: Guenter Roeck Signed-off-by: Andrey Smirnov --- drivers/tty/s

[PATCH v11 4/5] watchdog: Add RAVE SP watchdog driver

2017-11-06 Thread Andrey Smirnov
Herring Cc: Johan Hovold Cc: Sebastian Reichel Reviewed-by: Guenter Roeck Signed-off-by: Nikita Yushchenko Signed-off-by: Andrey Smirnov --- drivers/watchdog/Kconfig | 7 + drivers/watchdog/Makefile | 1 + drivers/watchdog/rave-sp-wdt.c | 357

[PATCH v11 3/5] mfd: Add driver for RAVE Supervisory Processor

2017-11-06 Thread Andrey Smirnov
-by: Chris Healy Reviewed-by: Guenter Roeck Reviewed-by: Andy Shevchenko Signed-off-by: Andrey Smirnov --- drivers/mfd/Kconfig | 9 + drivers/mfd/Makefile| 2 + drivers/mfd/rave-sp.c | 660 include/linux/mfd/rave-sp.h | 54

Re: [PATCH v2] watchdog: core: Make use of devm_register_reboot_notifier()

2017-10-18 Thread Andrey Smirnov
On Tue, Oct 17, 2017 at 3:08 PM, Andrew Morton wrote: > On Tue, 17 Oct 2017 08:50:12 -0700 Andrey Smirnov > wrote: > >> On Sat, Apr 15, 2017 at 11:11 PM, Guenter Roeck wrote: >> > On 04/11/2017 09:06 AM, Andrey Smirnov wrote: >> >> >> >> Save

[PATCH v8 0/5] ZII RAVE platform driver

2017-10-18 Thread Andrey Smirnov
t_source() revealed by further testing of the code - Incorporated feedback from Andy Shevchenko Changes since [v1]: - Updated wording in DT-bindings as per Rob's request. - Collected Rob's Acked-by for patch 2/2 Feedback is greatly appreciated! Thanks

[PATCH v8 2/5] serdev: Introduce devm_serdev_device_open()

2017-10-18 Thread Andrey Smirnov
rring Cc: cphe...@gmail.com Cc: Guenter Roeck Cc: Lucas Stach Cc: Nikita Yushchenko Cc: Lee Jones Cc: Greg Kroah-Hartman Cc: Pavel Machek Cc: Andy Shevchenko Cc: Johan Hovold Signed-off-by: Andrey Smirnov --- Documentation/driver-model/devres.txt | 3 +++ drivers/tty/serdev/core.c

[PATCH v8 4/5] watchdog: Add RAVE SP watchdog driver

2017-10-18 Thread Andrey Smirnov
Herring Cc: Johan Hovold Signed-off-by: Nikita Yushchenko Signed-off-by: Andrey Smirnov --- drivers/watchdog/Kconfig | 7 + drivers/watchdog/Makefile | 1 + drivers/watchdog/rave-sp-wdt.c | 310 + 3 files changed, 318 insertions(+) create

[PATCH v8 5/5] dt-bindings: watchdog: Add bindings for RAVE SP watchdog driver

2017-10-18 Thread Andrey Smirnov
: Mark Rutland Signed-off-by: Nikita Yushchenko Signed-off-by: Andrey Smirnov --- Documentation/devicetree/bindings/watchdog/zii,rave-sp-wdt.txt | 10 ++ 1 file changed, 10 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/zii,rave-sp-wdt.txt diff --git a

[PATCH v8 3/5] platform: Add driver for RAVE Supervisory Processor

2017-10-18 Thread Andrey Smirnov
Reviewed-by: Andy Shevchenko Signed-off-by: Andrey Smirnov --- drivers/platform/Kconfig| 2 + drivers/platform/Makefile | 1 + drivers/platform/rave/Kconfig | 25 ++ drivers/platform/rave/Makefile | 1 + drivers/platform/rave/rave-sp.c | 670

[PATCH v8 1/5] serdev: Make .remove in struct serdev_device_driver optional

2017-10-18 Thread Andrey Smirnov
enter Roeck Cc: Lucas Stach Cc: Nikita Yushchenko Cc: Lee Jones Cc: Greg Kroah-Hartman Cc: Pavel Machek Cc: Andy Shevchenko Cc: Johan Hovold Signed-off-by: Andrey Smirnov --- drivers/tty/serdev/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serdev/cor

Re: [PATCH] nvmem: rave-sp-eeprom: Remove VLA usage

2018-06-21 Thread Andrey Smirnov
> [1] > https://lkml.kernel.org/r/CA+55aFzCG-zNmZwX4A2FQpadafLfEzK6CC=qpxydaacu1rq...@mail.gmail.com > > Signed-off-by: Kees Cook I completely forgot that I was using VLAs in this driver. Thanks for fixing that! Reviewed-by: Andrey Smirnov Tested-by: Andrey Smirnov > --- > drivers/nvmem

Re: [PATCH 2/2] soc: imx: gpcv2: make pgc driver more generic for other i.MX platforms

2018-08-27 Thread Andrey Smirnov
v2_probe(struct platform_device *pdev) > return ret; > } > > + if (of_machine_is_compatible("fsl,imx7d")) { > + pgc_max_index = ARRAY_SIZE(imx7_pgc_domains); > + imx_pgc_domains = imx7_pgc_domains; > + } Is there any reason to do this explicit call to of_machine_is_compatible() as opposed to passing necessary data via .data in imx_gpcv2_dt_ids[]? The latter seems like a more straightforward way of passing variant specific driver info > + > + if (!imx_pgc_domains) { > + dev_err(&pdev->dev, "no device match found\n"); > + return -ENODEV; > + } And doing so would also allow you to drop the check above. Other that this seems like a reasonable change: Acked-by: Andrey Smirnov Thanks, Andrey Smirnov

Re: [PATCH 1/2] soc: imx: gpc: use A_CORE instread of A7 for more i.MX platforms

2018-08-27 Thread Andrey Smirnov
uang Looks reasonable to me: Acked-by: Andrey Smirnov > --- > drivers/soc/imx/gpcv2.c | 20 ++-- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c > index 6ef18cf..0e31465 100644 > --- a

Re: [PATCH 1/2] soc: imx: gpc: use A_CORE instread of A7 for more i.MX platforms

2018-08-27 Thread Andrey Smirnov
On Sun, Aug 26, 2018 at 7:14 PM Shawn Guo wrote: > > Andrey, > > Are you fine with these two patches? > I made a small comment on 2/2, but otherwise both patches seem reasonable (Acks provided in separate reply). Let me know if you need anything else from me. Thanks, Andrey Smirnov

Re: [PATCH 2/2] soc: imx: gpcv2: make pgc driver more generic for other i.MX platforms

2018-08-27 Thread Andrey Smirnov
On Mon, Aug 27, 2018 at 3:51 PM Andrey Smirnov wrote: > > On Sun, Aug 5, 2018 at 11:45 PM Anson Huang wrote: > > > > i.MX8MQ and i.MX8MM share same gpc module with i.MX7D, they > > can reuse gpcv2 pgc driver for power domain control, this > > patch renames all funct

Re: [PATCH 2/2] soc: imx: gpcv2: make pgc driver more generic for other i.MX platforms

2018-08-28 Thread Andrey Smirnov
On Mon, Aug 27, 2018 at 7:32 PM Anson Huang wrote: > > Hi, Andrey > > Anson Huang > Best Regards! > > > > -Original Message----- > > From: Andrey Smirnov > > Sent: Tuesday, August 28, 2018 7:04 AM > > To: Anson Huang > > Cc: Shawn Guo ;

Re: [PATCH 2/2] soc: imx: gpcv2: make pgc driver more generic for other i.MX platforms

2018-08-28 Thread Andrey Smirnov
On Tue, Aug 28, 2018 at 12:28 AM Anson Huang wrote: > > > > Anson Huang > Best Regards! > > > > -Original Message----- > > From: Andrey Smirnov > > Sent: Tuesday, August 28, 2018 6:51 AM > > To: Anson Huang > > Cc: Shawn Guo ; Sascha Hauer

Re: [PATCH v6 5/5] clk: imx: add clock driver for i.MX8MQ CCM

2018-08-28 Thread Andrey Smirnov
uot;, > "sys2_pll_250m", "sys1_pll_800m", > + "sys2_pll_1000m", > "sys3_pll2_out", "audio_pll2_out", "video_pll1_out", }; > + > +static const char *imx8mq_csi2_phy_sels[] = {"osc_25m", "sys2_pll_125m", > "sys2_pll_100m", "sys1_pll_800m", > +"sys2_pll_1000m", "clk_ext2", > "audio_pll2_out", "video_pll1_out", }; > + > +static const char *imx8mq_csi2_esc_sels[] = {"osc_25m", "sys2_pll_100m", > "sys1_pll_80m", "sys1_pll_800m", > +"sys2_pll_1000m", > "sys3_pll2_out", "clk_ext3", "audio_pll2_out", }; > + > +static const char *imx8mq_pcie2_ctrl_sels[] = {"osc_25m", "sys2_pll_250m", > "sys2_pll_200m", "sys1_pll_266m", > + "sys1_pll_800m", > "sys2_pll_500m", "sys2_pll_333m", "sys3_pll2_out", }; > + > +static const char *imx8mq_pcie2_phy_sels[] = {"osc_25m", "sys2_pll_100m", > "sys2_pll_500m", "clk_ext1", > + "clk_ext2", "clk_ext3", > "clk_ext4", "sys1_pll_400m", }; > + > +static const char *imx8mq_pcie2_aux_sels[] = {"osc_25m", "sys2_pll_200m", > "sys2_pll_50m", "sys3_pll2_out", > + "sys2_pll_100m", > "sys1_pll_80m", "sys1_pll_160m", "sys1_pll_200m", }; > + > +static const char *imx8mq_ecspi3_sels[] = {"osc_25m", "sys2_pll_200m", > "sys1_pll_40m", "sys1_pll_160m", > + "sys1_pll_800m", "sys3_pll2_out", > "sys2_pll_250m", "audio_pll2_out", }; > +static const char *imx8mq_dram_core_sels[] = {"dram_pll_out", > "dram_alt_root", }; > + > +static const char *imx8mq_clko2_sels[] = {"osc_25m", "sys2_pll_200m", > "sys1_pll_400m", "sys2_pll_166m", "audio_pll1_out", > +"video_pll1_out", "ckil", }; > + > +static int const clks_init_on[] __initconst = { > + IMX8MQ_CLK_DRAM_CORE, IMX8MQ_CLK_AHB_CG, > + IMX8MQ_CLK_NOC, IMX8MQ_CLK_NOC_APB, > + IMX8MQ_CLK_USB_BUS, IMX8MQ_CLK_NAND_USDHC_BUS, > + IMX8MQ_CLK_MAIN_AXI, IMX8MQ_CLK_A53_CG, > + IMX8MQ_CLK_AUDIO_AHB_DIV, IMX8MQ_CLK_TMU_ROOT, > + IMX8MQ_CLK_DRAM_APB, > +}; > + > +static struct clk_onecell_data clk_data; > + > +static void __init imx8mq_clocks_init(struct device_node *ccm_node) > +{ > + struct device_node *np; > + void __iomem *base; > + int i; > + > + clks[IMX8MQ_CLK_DUMMY] = imx_clk_fixed("dummy", 0); > + clks[IMX8MQ_CLK_32K] = of_clk_get_by_name(ccm_node, "ckil"); > + clks[IMX8MQ_CLK_25M] = of_clk_get_by_name(ccm_node, "osc_25m"); > + clks[IMX8MQ_CLK_27M] = of_clk_get_by_name(ccm_node, "osc_27m"); > + clks[IMX8MQ_CLK_EXT1] = of_clk_get_by_name(ccm_node, "clk_ext1"); > + clks[IMX8MQ_CLK_EXT2] = of_clk_get_by_name(ccm_node, "clk_ext2"); > + clks[IMX8MQ_CLK_EXT3] = of_clk_get_by_name(ccm_node, "clk_ext3"); > + clks[IMX8MQ_CLK_EXT4] = of_clk_get_by_name(ccm_node, "clk_ext4"); > + > + np = of_find_compatible_node(NULL, NULL, "fsl,imx8mq-anatop"); > + base = of_iomap(np, 0); > + WARN_ON(!base); > + > + clks[IMX8MQ_ARM_PLL_REF_SEL] = imx_clk_mux("arm_pll_ref_sel", base + > 0x28, 16, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); > + clks[IMX8MQ_GPU_PLL_REF_SEL] = imx_clk_mux("gpu_pll_ref_sel", base + > 0x18, 16, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); > + clks[IMX8MQ_VPU_PLL_REF_SEL] = imx_clk_mux("vpu_pll_ref_sel", base + > 0x20, 16, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); > + clks[IMX8MQ_AUDIO_PLL1_REF_SEL] = imx_clk_mux("audio_pll1_ref_sel", > base + 0x0, 16, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); > + clks[IMX8MQ_AUDIO_PLL2_REF_SEL] = imx_clk_mux("audio_pll2_ref_sel", > base + 0x8, 16, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); > + clks[IMX8MQ_VIDEO_PLL1_REF_SEL] = imx_clk_mux("video_pll1_ref_sel", > base + 0x10, 16, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); > + clks[IMX8MQ_SYS1_PLL1_REF_SEL] = imx_clk_mux("sys1_pll1_ref_sel", > base + 0x30, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); > + clks[IMX8MQ_SYS2_PLL1_REF_SEL] = imx_clk_mux("sys2_pll1_ref_sel", > base + 0x3c, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); > + clks[IMX8MQ_SYS3_PLL1_REF_SEL] = imx_clk_mux("sys3_pll1_ref_sel", > base + 0x48, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); > + clks[IMX8MQ_DRAM_PLL1_REF_SEL] = imx_clk_mux("dram_pll1_ref_sel", > base + 0x60, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); > + clks[IMX8MQ_VIDEO2_PLL1_REF_SEL] = imx_clk_mux("video2_pll1_ref_sel", > base + 0x54, 0, 2, pll_ref_sels, ARRAY_SIZE(pll_ref_sels)); > + > + clks[IMX8MQ_ARM_PLL_REF_DIV]= imx_clk_divider("arm_pll_ref_div", > "arm_pll_ref_sel", base + 0x28, 5, 6); > + clks[IMX8MQ_GPU_PLL_REF_DIV]= imx_clk_divider("gpu_pll_ref_div", > "gpu_pll_ref_sel", base + 0x18, 5, 6); > + clks[IMX8MQ_VPU_PLL_REF_DIV]= imx_clk_divider("vpu_pll_ref_div", > "vpu_pll_ref_sel", base + 0x20, 5, 6); > + clks[IMX8MQ_AUDIO_PLL1_REF_DIV] = > imx_clk_divider("audio_pll1_ref_div", "audio_pll1_ref_sel", base + 0x0, 5, 6); > + clks[IMX8MQ_AUDIO_PLL2_REF_DIV] = > imx_clk_divider("audio_pll2_ref_div", "audio_pll2_ref_sel", base + 0x8, 5, 6); > + clks[IMX8MQ_VIDEO_PLL1_REF_DIV] = > imx_clk_divider("video_pll1_ref_div", "video_pll1_ref_sel", base + 0x10, 5, > 6); > + clks[IMX8MQ_SYS1_PLL1_REF_DIV] = > imx_clk_divider("sys1_pll1_ref_div", "sys1_pll1_ref_sel", base + 0x38, 25, 3); > + clks[IMX8MQ_SYS2_PLL1_REF_DIV] = > imx_clk_divider("sys2_pll1_ref_div", "sys2_pll1_ref_sel", base + 0x44, 25, 3); > + clks[IMX8MQ_SYS3_PLL1_REF_DIV] = > imx_clk_divider("sys3_pll1_ref_div", "sys3_pll1_ref_sel", base + 0x50, 25, 3); > + clks[IMX8MQ_DRAM_PLL1_REF_DIV] = > imx_clk_divider("dram_pll1_ref_div", "dram_pll1_ref_sel", base + 0x68, 25, 3); > + clks[IMX8MQ_VIDEO2_PLL1_REF_DIV] = > imx_clk_divider("video2_pll1_ref_div", "video2_pll1_ref_sel", base + 0x5c, > 25, 3); > + > + clks[IMX8MQ_ARM_PLL] = imx_clk_frac_pll("arm_pll", "arm_pll_ref_div", > base + 0x28); > + clks[IMX8MQ_GPU_PLL] = imx_clk_frac_pll("gpu_pll", "gpu_pll_ref_div", > base + 0x18); > + clks[IMX8MQ_VPU_PLL] = imx_clk_frac_pll("vpu_pll", "vpu_pll_ref_div", > base + 0x20); > + clks[IMX8MQ_AUDIO_PLL1] = imx_clk_frac_pll("audio_pll1", > "audio_pll1_ref_div", base + 0x0); > + clks[IMX8MQ_AUDIO_PLL2] = imx_clk_frac_pll("audio_pll2", > "audio_pll2_ref_div", base + 0x8); > + clks[IMX8MQ_VIDEO_PLL1] = imx_clk_frac_pll("video_pll1", > "video_pll1_ref_div", base + 0x10); > + clks[IMX8MQ_SYS1_PLL1] = imx_clk_sccg_pll("sys1_pll1", > "sys1_pll1_ref_div", base + 0x30, SCCG_PLL1); > + clks[IMX8MQ_SYS2_PLL1] = imx_clk_sccg_pll("sys2_pll1", > "sys2_pll1_ref_div", base + 0x3c, SCCG_PLL1); > + clks[IMX8MQ_SYS3_PLL1] = imx_clk_sccg_pll("sys3_pll1", > "sys3_pll1_ref_div", base + 0x48, SCCG_PLL1); > + clks[IMX8MQ_DRAM_PLL1] = imx_clk_sccg_pll("dram_pll1", > "dram_pll1_ref_div", base + 0x60, SCCG_PLL1); > + clks[IMX8MQ_VIDEO2_PLL1] = imx_clk_sccg_pll("video2_pll1", > "video2_pll1_ref_div", base + 0x5c, 3); This is a bug which will result in a crash once IMX8MQ_VIDEO2_PLL1 is exercised (I know that from having to debug this issue when using this code in Barebox). Last argument should be SCCG_PLL1. Thanks, Andrey Smirnov

Re: [PATCH v6 3/5] clk: imx: add SCCG PLL type

2018-08-28 Thread Andrey Smirnov
> + .unprepare = clk_pll1_unprepare, > + .recalc_rate= clk_pll2_recalc_rate, > + .round_rate = clk_pll2_round_rate, > + .set_rate = clk_pll2_set_rate, > +}; > + > +struct clk *imx_clk_sccg_pll(const char *name, > + const char *parent_name, > + void __iomem *base, > + enum imx_sccg_pll_type pll_type) > +{ > + struct clk_sccg_pll *pll; > + struct clk *clk; > + struct clk_init_data init; > + > + pll = kzalloc(sizeof(*pll), GFP_KERNEL); > + if (!pll) > + return ERR_PTR(-ENOMEM); > + > + pll->base = base; > + init.name = name; > + switch (pll_type) { > + case SCCG_PLL1: > + init.ops = &clk_sccg_pll1_ops; > + break; > + case SCCG_PLL2: > + init.ops = &clk_sccg_pll2_ops; > + break; > + } Please add error checking in the switch above since it's pretty clear that a wrong kind of argument can be passed as a pll_type without it being noticeable. Thanks, Andrey Smirnov

Re: [PATCH v6 3/5] clk: imx: add SCCG PLL type

2018-08-28 Thread Andrey Smirnov
On Tue, Aug 28, 2018 at 3:58 AM Abel Vesa wrote: > > On Fri, Aug 24, 2018 at 09:40:11AM +0200, Sascha Hauer wrote: > > +Cc Andrey Smirnov who made me aware of this issue. > > > > On Wed, Aug 22, 2018 at 04:48:21PM +0300, Abel Vesa wrote: > > > From: Lucas Stach

[PATCH] hid: microsoft: Add rumble support for Xbox One S controller

2018-08-09 Thread Andrey Smirnov
@vger.kernel.org Cc: Pierre-Loup A. Griffais Signed-off-by: Juha Kuikka Signed-off-by: Andrey Smirnov --- drivers/hid/Kconfig | 8 ++ drivers/hid/hid-ids.h | 1 + drivers/hid/hid-microsoft.c | 142 ++-- drivers/hid/hid-quirks.c| 1 + 4 files changed

Re: [PATCH] hid: microsoft: Add rumble support for Xbox One S controller

2018-08-13 Thread Andrey Smirnov
On Fri, Aug 10, 2018 at 2:37 AM Benjamin Tissoires wrote: > > Hi Andrew, > > On Fri, Aug 10, 2018 at 2:17 AM Andrey Smirnov > wrote: > > > > Add HID quirk driver for Xbox One S controller over bluetooth. > > > > This driver only adds support for rumble. S

Re: [PATCH] hid: microsoft: Add rumble support for Xbox One S controller

2018-08-13 Thread Andrey Smirnov
On Fri, Aug 10, 2018 at 4:38 AM Bastien Nocera wrote: > > On Thu, 2018-08-09 at 17:17 -0700, Andrey Smirnov wrote: > > Add HID quirk driver for Xbox One S controller over bluetooth. > > > > This driver only adds support for rumble. Standard controller > > functiona

<    1   2   3   4   5   6   7   8   9   10   >