[PATCH v6 17/17] ASoC: fsl_ssi: Use ssi->streams instead of reading register

2018-02-12 Thread Nicolin Chen
Since ssi->streams is being updated along with SCR register and its SSIEN bit, it's simpler to use it instead. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- sound/soc/fsl/fsl_ssi.c | 7 +-- 1 file changed, 1 insertio

[PATCH v6 16/17] ASoC: fsl_ssi: Move DT related code to a separate probe()

2018-02-12 Thread Nicolin Chen
This patch cleans up probe() function by moving all Device Tree related code into a separate function. It allows the probe() to be Device Tree independent. This will be very useful for future integration of imx-ssi driver which has similar functionalities while exists only because it supports non-D

[PATCH v6 12/17] ASoC: fsl_ssi: Move one-time configurations to probe()

2018-02-12 Thread Nicolin Chen
The probe() could handle some one-time configurations since they will not be changed once being configured. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- sound/soc/fsl/fsl_ssi.c | 39 ++---

[PATCH v6 14/17] ASoC: fsl_ssi: Clean up _fsl_ssi_set_dai_fmt()

2018-02-12 Thread Nicolin Chen
The _fsl_ssi_set_dai_fmt() is a helper function being called from fsl_ssi_set_dai_fmt() as an ASoC operation and fsl_ssi_hw_init() mainly for AC97 format initialization. This patch cleans the _fsl_ssi_set_dai_fmt() in following ways: * Removing *dev pointer in the parameters as it's included in th

usleep_range without a range

2018-02-12 Thread Joe Perches
scheduling can generally be better when these values are not identical. Perhaps these ranges should be expanded. $ git grep -P -n "usleep_range\s*\(\s*([\w\.\>\-]+)\s*,\s*\1\s*\)" drivers/clk/ux500/clk-sysctrl.c:45: usleep_range(clk->enable_delay_us, clk->enable_delay_us); drivers/cp

[PATCH v6 15/17] ASoC: fsl_ssi: Add bool synchronous to mark synchronous mode

2018-02-12 Thread Nicolin Chen
Using symmetric_rates in the cpu_dai_drv is a bit implicit, so this patch adds a bool synchronous instead. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- sound/soc/fsl/fsl_ssi.c | 13 - 1 file changed, 8 inser

[PATCH v6 11/17] ASoC: fsl_ssi: Use snd_soc_init_dma_data instead

2018-02-12 Thread Nicolin Chen
Since there is a helper function, use it to help readability. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- sound/soc/fsl/fsl_ssi.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl

[PATCH v6 10/17] ASoC: fsl_ssi: Set xFEN0 and xFEN1 together

2018-02-12 Thread Nicolin Chen
It'd be safer to enable both FIFOs for TX or RX at the same time. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Maciej S. Szmigiero --- sound/soc/fsl/fsl_ssi.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sou

[PATCH v6 02/17] ASoC: fsl_ssi: Keep ssi->i2s_net updated

2018-02-12 Thread Nicolin Chen
The hw_params() overwrites i2s_net settings for special cases like mono-channel support, however, it doesn't update ssi->i2s_net as set_dai_fmt() does. This patch removes the local i2s_net variable and directly updates ssi->i2s_net in the hw_params() so that the driver can simply look up the ssi->

[PATCH v6 07/17] ASoC: fsl_ssi: Clean up helper functions of trigger()

2018-02-12 Thread Nicolin Chen
The trigger() calls fsl_ssi_tx_config() and fsl_ssi_rx_config(), and both of them jump to fsl_ssi_config(). And fsl_ssi_config() later calls another fsl_ssi_rxtx_config(). However, the whole routine, especially fsl_ssi_config() function, is too complicated because of the folowing reasons: 1) It ha

[PATCH v6 08/17] ASoC: fsl_ssi: Add DAIFMT define for AC97

2018-02-12 Thread Nicolin Chen
The _fsl_ssi_set_dai_fmt() bypasses an undefined format for AC97 mode. However, it's not really necessary if AC97 has its complete format defined. So this patch adds a DAIFMT macro of complete format including a clock direction and polarity. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Te

[PATCH v6 03/17] ASoC: fsl_ssi: Clean up set_dai_tdm_slot()

2018-02-12 Thread Nicolin Chen
This patch replaces the register read with ssi->i2s_net for simplification. It also removes masking SSIEN from scr value since it's handled later by regmap_update_bits() to set this scr value back. Signed-off-by: Nicolin Chen Tested-by: Caleb Crome Tested-by: Maciej S. Szmigiero Reviewed-by: Ma

[PATCH v6 06/17] ASoC: fsl_ssi: Clear FIFO directly in fsl_ssi_config()

2018-02-12 Thread Nicolin Chen
The FIFO clear helper function is just one line of code now. So it could be cleaned up by removing it and calling regmap directly. Meanwhile, FIFO clear could be applied to all use cases, not confined to AC97. So this patch also moves FIFO clear in the trigger() to fsl_ssi_config() and removes the

[PATCH v6 05/17] ASoC: fsl_ssi: Rename fsl_ssi_disable_val macro

2018-02-12 Thread Nicolin Chen
The define of fsl_ssi_disable_val is not so clear as it mixes two steps of calculations together. And those parameter names are also a bit long to read. Since it just tries to exclude the shared bits from the regvals of current stream while the opposite stream is active, it's better to use somethi

[PATCH v6 01/17] ASoC: fsl_ssi: Redefine RX and TX macros

2018-02-12 Thread Nicolin Chen
The RX and TX macros were defined implicitly and there was a potential risk if someone changes their values. Since they were defined to index the array ssi->regvals[2], this patch moves these two macros to fsl_ssi.c, closer to its owner ssi->regvals. And it also puts some comments here to limit th

[PATCH v6 04/17] ASoC: fsl_ssi: Maintain a mask of active streams

2018-02-12 Thread Nicolin Chen
Checking TE and RE bits in SCR register doesn't work for AC97 mode which enables SSIEN, TE and RE in the fsl_ssi_setup_ac97() that's called during probe(). So when running into the trigger(), it will always get the result of both TE and RE being enabled already, even if actually there is no active

[PATCH v3 0/5] Add support for i2c_new_secondary_device

2018-02-12 Thread Kieran Bingham
From: Kieran Bingham Back in 2014, Jean-Michel provided patches [0] to implement a means of describing software defined I2C addresses for devices through the DT nodes. The patch to implement the function "i2c_new_secondary_device()" was integrated, but the corresponding driver update didn't get

[PATCH v3 3/5] [RFT] ARM: dts: wheat: Fix ADV7513 address usage

2018-02-12 Thread Kieran Bingham
From: Kieran Bingham The r8a7792 Wheat board has two ADV7513 devices sharing a single i2c bus, however in low power mode the ADV7513 will reset it's slave maps to use the hardware defined default addresses. The ADV7511 driver was adapted to allow the two devices to be registered correctly - but

[PATCH v3 1/5] dt-bindings: media: adv7604: Add support for i2c_new_secondary_device

2018-02-12 Thread Kieran Bingham
From: Jean-Michel Hautbois The ADV7604 has thirteen 256-byte maps that can be accessed via the main I²C ports. Each map has it own I²C address and acts as a standard slave device on the I²C bus. Extend the device tree node bindings to be able to override the default addresses so that address con

[PATCH v3 5/5] drm: adv7511: Add support for i2c_new_secondary_device

2018-02-12 Thread Kieran Bingham
From: Kieran Bingham The ADV7511 has four 256-byte maps that can be accessed via the main I²C ports. Each map has it own I²C address and acts as a standard slave device on the I²C bus. Allow a device tree node to override the default addresses so that address conflicts with other devices on the

[PATCH v3 2/5] dt-bindings: adv7511: Add support for i2c_new_secondary_device

2018-02-12 Thread Kieran Bingham
From: Kieran Bingham The ADV7511 has four 256-byte maps that can be accessed via the main I²C ports. Each map has it own I²C address and acts as a standard slave device on the I²C bus. Extend the device tree node bindings to be able to override the default addresses so that address conflicts wit

[PATCH v3 4/5] media: adv7604: Add support for i2c_new_secondary_device

2018-02-12 Thread Kieran Bingham
From: Jean-Michel Hautbois The ADV7604 has thirteen 256-byte maps that can be accessed via the main I²C ports. Each map has it own I²C address and acts as a standard slave device on the I²C bus. Allow a device tree node to override the default addresses so that address conflicts with other devic

Re: [lustre-devel] [PATCH 08/19] staging: lustre: simplify waiting in ldlm_completion_ast()

2018-02-12 Thread Patrick Farrell
Neil, I didn't get anything after 8/19 in this series. Is this just me? (I'd keep waiting, except I also found a few things in this patch.) Minor: The line XXX ALLOCATE is out of date and could go. (It refers to a mix of things you eliminated and things that were already gone.) Less minor:

Re: [PATCH v2 1/3] Input: gpio-keys - add support for wakeup event action

2018-02-12 Thread Brian Norris
Hi Jeffy, On Sat, Feb 10, 2018 at 07:09:05PM +0800, Jeffy Chen wrote: > Add support for specifying event actions to trigger wakeup when using > the gpio-keys input device as a wakeup source. > > This would allow the device to configure when to wakeup the system. For > example a gpio-keys input de

Re: [PATCH v2 5/5] ALSA: emu10k1: add a IOMMU workaround

2018-02-12 Thread Maciej S. Szmigiero
On 12.02.2018 13:56, Takashi Iwai wrote: > On Sat, 27 Jan 2018 15:42:59 +0100, > Maciej S. Szmigiero wrote: >> >> The Audigy 2 CA0102 chip (but most likely others from the emu10k1 family, >> too) has a problem that from time to time it likes to do few DMA reads a >> bit beyond its normal allocati

Re: [PATCH v2 4/5] ALSA: emu10k1: make sure synth DMA pages are allocated with DMA functions

2018-02-12 Thread Maciej S. Szmigiero
On 12.02.2018 13:44, Takashi Iwai wrote: > On Sat, 27 Jan 2018 15:42:47 +0100, > Maciej S. Szmigiero wrote: >> >> Commit a5003fc04113 ("[ALSA] emu10k1 - simplify page allocation for synth") >> switched from using the DMA allocator for synth DMA pages to manually >> calling alloc_page(). >> Howeve

Re: [PATCH] irqchip: Use %px to print pointer value

2018-02-12 Thread Jonas Gorski
On 9 February 2018 at 17:04, Marc Zyngier wrote: > On 09/02/18 15:54, Florian Fainelli wrote: >> On February 9, 2018 12:51:33 AM PST, Marc Zyngier >> wrote: >>> On 09/02/18 02:10, Jaedon Shin wrote: Since commit ad67b74d2469 ("printk: hash addresses printed with %p") pointers printed w

Re: [PATCH 4/4] staging: iio: accel: Move adis16201 driver out of staging

2018-02-12 Thread Philippe Ombredanne
On Mon, Feb 12, 2018 at 3:37 PM, Himanshu Jha wrote: > On Mon, Feb 12, 2018 at 03:10:56PM +0100, Philippe Ombredanne wrote: >> On Mon, Feb 12, 2018 at 12:54 PM, Himanshu Jha >> wrote: >> > Move the adis16201 driver out of staging directory and merge to the >> > mainline IIO directory. >> > >> > S

[PATCH V4 1/5] perf/x86/intel: Fix event update for auto-reload

2018-02-12 Thread kan . liang
From: Kan Liang There is a bug when mmap read event->count with large PEBS enabled. Here is an example. #./read_count 0x71f0 0x122c0 0x11c54 0x10001257d 0x2bdc5 In fixed period mode, the auto-reload mechanism could be enabled for PEBS events. But the calculation of even

[PATCH V4 0/5] bugs fix for auto-reload mmap read and rdpmc read

2018-02-12 Thread kan . liang
From: Kan Liang -- Changes since V3: - Apply Peter's patch to fix event update for auto-reload event - Based on Peter's patch, specially handle case A. - Introduce specific read function for auto-reload event, not just large PEBS. Changes since V2: - Refined the changelog - Introduc

[RFC PATCH 0/3] Interface for higher order contiguous allocations

2018-02-12 Thread Mike Kravetz
These patches came out of the "[RFC] mmap(MAP_CONTIG)" discussions at: http://lkml.kernel.org/r/21f1ec96-2822-1189-1c95-79a2bb491...@oracle.com One suggestion in that thread was to create a friendlier interface that could be used by drivers and others outside core mm code to allocate a contiguous

Re: [PATCH 2/2] i2c: piix4: Use usleep_range()

2018-02-12 Thread Guenter Roeck
Hi Jean, On Mon, Feb 12, 2018 at 11:53:36AM +0100, Jean Delvare wrote: > Hi Guenter, > > On Sat, 30 Dec 2017 08:50:58 -0800, Guenter Roeck wrote: > > The piix4 i2c driver is extremely slow. Replacing msleep() > > with usleep_range() increases its speed substantially. > > > > Signed-off-by: Guent

[PATCH V4 5/5] perf/x86: Fix: disable userspace RDPMC usage for large PEBS

2018-02-12 Thread kan . liang
From: Kan Liang The userspace RDPMC usage never works for large PEBS since the large PEBS is introduced by commit b8241d20699e ("perf/x86/intel: Implement batched PEBS interrupt handling (large PEBS interrupt threshold)") When the PEBS interrupt threshold is larger than one, there is no way to g

[PATCH V4 3/5] perf/x86/intel/ds: Introduce read function for auto-reload event

2018-02-12 Thread kan . liang
From: Kan Liang There is no way to get exact auto-reload times and value which needed for event update unless flush the PEBS buffer. Introduce intel_pmu_auto_reload_read() to drain the PEBS buffer for auto reload event. To prevent the race, the drain_pebs() only be called when the PMU is disable

[PATCH V4 2/5] perf/x86: Introduce read function for x86_pmu

2018-02-12 Thread kan . liang
From: Kan Liang Auto-reload needs to be specially handled in event count read. Signed-off-by: Kan Liang --- arch/x86/events/core.c | 2 ++ arch/x86/events/perf_event.h | 1 + 2 files changed, 3 insertions(+) diff --git a/arch/x86/events/core.c b/arch/x86/events/core.c index 5a3ccd1..00a

Re: [PATCH] perf: Add support for creating offline events

2018-02-12 Thread Raghavendra Rao Ananta
On 02/12/2018 01:21 PM, Jiri Olsa wrote: On Mon, Feb 12, 2018 at 10:04:42PM +0100, Jiri Olsa wrote: On Mon, Feb 12, 2018 at 09:42:05AM -0800, Raghavendra Rao Ananta wrote: Hi Jiri, Thank you for the response. Does perf tool has its own check to see if the CPU was offline during the lifetime

[RFC PATCH 1/3] mm: make start_isolate_page_range() fail if already isolated

2018-02-12 Thread Mike Kravetz
start_isolate_page_range() is used to set the migrate type of a page block to MIGRATE_ISOLATE while attempting to start a migration operation. It is assumed that only one thread is attempting such an operation, and due to the limited number of callers this is generally the case. However, there ar

[PATCH V4 4/5] perf/x86/intel: Fix pmu read for auto-reload

2018-02-12 Thread kan . liang
From: Kan Liang Auto-reload event needs to be specially handled in event count read. Auto-reload is only available for intel_pmu. Fixes: b8241d20699e ("perf/x86/intel: Implement batched PEBS interrupt handling (large PEBS interrupt threshold)") Signed-off-by: Kan Liang --- arch/x86/events/int

[RFC PATCH 2/3] mm: add find_alloc_contig_pages() interface

2018-02-12 Thread Mike Kravetz
find_alloc_contig_pages() is a new interface that attempts to locate and allocate a contiguous range of pages. It is provided as a more convenient interface to the existing alloc_contig_range() interface which is used by CMA, memory hotplug and gigantic huge pages. When attempting to allocate a r

[RFC PATCH 3/3] mm/hugetlb: use find_alloc_contig_pages() to allocate gigantic pages

2018-02-12 Thread Mike Kravetz
Use the new find_alloc_contig_pages() interface for the allocation of gigantic pages. Signed-off-by: Mike Kravetz --- mm/hugetlb.c | 88 +--- 1 file changed, 6 insertions(+), 82 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 9

Re: [PATCH] Support TrackStick of Thinkpad L570

2018-02-12 Thread Pali Rohár
Masaki: About firmware update, there is Linux Vendor Firmware Service project at https://fwupd.org/ exactly for purpose to update firmwares from Linux distributions. Maintainer of this project, Richard Hughes (CCed), is more times willing to write support for new devices. So maybe this can be a sol

[PATCH 3/4] arm64: dts: renesas: r8a77995: add VSPBS instance

2018-02-12 Thread Kieran Bingham
From: Kieran Bingham The r8a77995 has a VSPBS to support image processing such as blending of 2 input images. Signed-off-by: Kieran Bingham --- arch/arm64/boot/dts/renesas/r8a77995.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b

[PATCH 1/4] arm64: dts: renesas: r8a77995: add FCPVB node

2018-02-12 Thread Kieran Bingham
From: Kieran Bingham The FCPVB handles the interface between the VSPB and memory. Signed-off-by: Kieran Bingham --- arch/arm64/boot/dts/renesas/r8a77995.dtsi | 9 + 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b/arch/arm64/boot/dts/renesas/r8

[PATCH 2/4] arm64: dts: renesas: r8a77995: add FCPVD nodes

2018-02-12 Thread Kieran Bingham
From: Kieran Bingham The FCPVD handles the interface between the VSPD and memory. Signed-off-by: Kieran Bingham --- arch/arm64/boot/dts/renesas/r8a77995.dtsi | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b/arch/arm64/boot/dts

[PATCH 4/4] arm64: dts: renesas: r8a77995: add VSPD instances

2018-02-12 Thread Kieran Bingham
From: Kieran Bingham The r8a77995 has two VSPDs to handle display pipelines with a DU. Signed-off-by: Kieran Bingham --- arch/arm64/boot/dts/renesas/r8a77995.dtsi | 20 1 file changed, 20 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b/arch/arm64/b

Re: [PATCH v10 6/8] media: i2c: Add TDA1997x HDMI receiver driver

2018-02-12 Thread Tim Harvey
On Fri, Feb 9, 2018 at 12:08 AM, Hans Verkuil wrote: > Hi Tim, > > We're almost there. Two more comments: > > On 02/09/2018 07:32 AM, Tim Harvey wrote: >> +static int >> +tda1997x_detect_std(struct tda1997x_state *state, >> + struct v4l2_dv_timings *timings) >> +{ >> + struct v

Re: [PATCH 2/3] Documentation: bindings: add usb3-host-disable and usb3-host-port for Rockchip USB Type-C PHY

2018-02-12 Thread Rob Herring
On Mon, Feb 12, 2018 at 3:26 PM, Brian Norris wrote: > Hi, > > On Mon, Feb 12, 2018 at 10:43:41AM -0600, Rob Herring wrote: >> On Thu, Feb 8, 2018 at 3:23 PM, Enric Balletbo Serra >> wrote: >> > 2018-02-08 18:52 GMT+01:00 Rob Herring : >> >> On Thu, Feb 8, 2018 at 9:20 AM, Enric Balletbo i Serra

Re: [PATCH] RDMA/nldev: Fix multiple potential NULL pointer dereferences

2018-02-12 Thread Gustavo A. R. Silva
Hi Leon, On 02/09/2018 11:36 AM, Gustavo A. R. Silva wrote: Quoting Leon Romanovsky : On Fri, Feb 09, 2018 at 09:56:00AM -0600, Gustavo A. R. Silva wrote: Quoting Leon Romanovsky : > On Fri, Feb 09, 2018 at 07:36:49AM -0600, Gustavo A. R. Silva wrote: > > Hi Leon, > > > > Quoting Leon Roma

linux-next: Signed-off-by missing for commits in the nand tree

2018-02-12 Thread Stephen Rothwell
Hi Boris, A whole series of commits 558783726c98 ("mtd: nand: mxc: reorder functions to avoid forward declarations") to e385e291129e ("mtd: nand: mxc: remove now unused code") are missing a Signed-off-by from their committer. -- Cheers, Stephen Rothwell

[PATCH] ia64: Remove pci-swiotlb.o from kernel Makefile

2018-02-12 Thread Guenter Roeck
Commit 4fac8076df85 ("ia64: clean up swiotlb support") removed arch/ia64/kernel/pci-swiotlb.c but neglected to update the ia64 kernel Makefile. This results in make[2]: *** No rule to make target 'arch/ia64/kernel/pci-swiotlb.o', needed by 'arch/ia64/kernel/built-in.o'. Stop. when trying

[PATCH 2/2] powerpc/pseries: Declare optional dummy function for find_and_online_cpu_nid

2018-02-12 Thread Guenter Roeck
Commit e67e02a544e9 ("powerpc/pseries: Fix cpu hotplug crash with memoryless nodes") adds an unconditional call to find_and_online_cpu_nid(), which is only declared if CONFIG_PPC_SPLPAR is enabled. This results in the following build error if this is not the case. arch/powerpc/platforms/pseries/ho

[PATCH 1/2] powerpc/kdump: Add missing optional dummy functions

2018-02-12 Thread Guenter Roeck
If KEXEC_CORE is not enabled, PowerNV builds fail as follows. arch/powerpc/platforms/powernv/smp.c: In function 'pnv_smp_cpu_kill_self': arch/powerpc/platforms/powernv/smp.c:236:4: error: implicit declaration of function 'crash_ipi_callback' Add dummy function calls, similar to kdump_in_p

[RFC PATCH] MIPS: Provide cmpxchg64 for 32-bit builds

2018-02-12 Thread Guenter Roeck
Since commit 60f481b970386 ("i40e: change flags to use 64 bits"), the i40e driver uses cmpxchg64(). This causes mips:allmodconfig builds to fail with drivers/net/ethernet/intel/i40e/i40e_ethtool.c: In function 'i40e_set_priv_flags': drivers/net/ethernet/intel/i40e/i40e_ethtool.c:4443:2: er

linux-next: lots of merges in the sound-asoc tree

2018-02-12 Thread Stephen Rothwell
Hi all, I know that you usually like to keep one topic branch per soc and then merge them all, but currently your tree seems to only contain a couple logical changes (platform to component and codec to component), so surely that could have been done in (maybe) 2 topic branches and saved large numb

[PATCH] fs/signalfd: fix build error for BUS_MCEERR_AR

2018-02-12 Thread Randy Dunlap
-by: Randy Dunlap Cc: Eric Biederman Cc: Alexander Viro --- fs/signalfd.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) Applies to mainline 4.16-rc1. --- linux-next-20180212.orig/fs/signalfd.c +++ linux-next-20180212/fs/signalfd.c @@ -118,13 +118,22 @@

Re: [PATCH] headers: untangle kmemleak.h from mm.h

2018-02-12 Thread Randy Dunlap
On 02/12/2018 04:28 AM, Michael Ellerman wrote: > Randy Dunlap writes: > >> From: Randy Dunlap >> >> Currently #includes for no obvious >> reason. It looks like it's only a convenience, so remove kmemleak.h >> from slab.h and add to any users of kmemleak_* >> that don't already #include it. >

[PATCH 05/45] rtc: export rtc_nvmem_register() to drivers

2018-02-12 Thread Alexandre Belloni
Export rtc_nvmem_register() so it can be called from drivers instead of only the core. Signed-off-by: Alexandre Belloni --- drivers/rtc/nvmem.c| 3 +-- drivers/rtc/rtc-core.h | 13 - include/linux/rtc.h| 13 + 3 files changed, 14 insertions(+), 15 deletions(-) d

[PATCH 31/45] rtc: cmos: fix possible race condition

2018-02-12 Thread Alexandre Belloni
The probe function is not allowed to fail after registering the RTC because the following may happen: CPU0:CPU1: sys_load_module() do_init_module() do_one_initcall() cmos_do_probe() rtc_device_register() __register_chrdev() cdev->owner = struct m

[PATCH 44/45] rtc: tx4939: fix possible race condition

2018-02-12 Thread Alexandre Belloni
The probe function is not allowed to fail after registering the RTC. Call rtc_register_device() at the end. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-tx4939.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-tx4939.c b/drivers/rtc/rtc-tx4939.c i

[PATCH 33/45] rtc: ds1742: switch to rtc_register_device

2018-02-12 Thread Alexandre Belloni
This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1742.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c index 3abf1cbfb8ce..84e19fe2ca3b 100644 --- a/drivers

[PATCH 10/45] rtc: ds1511: call rtc_nvmem_register()

2018-02-12 Thread Alexandre Belloni
Call rtc_nvmem_register instead of letting the core do it and stop using the nvmem_config member of struct rtc_device. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1511.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds

[PATCH 03/45] rtc: nvmem: return error values

2018-02-12 Thread Alexandre Belloni
In case of error, make rtc_nvmem_register() able to return an error value to its caller. Signed-off-by: Alexandre Belloni --- drivers/rtc/nvmem.c| 10 ++ drivers/rtc/rtc-core.h | 11 +++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/rtc/nvmem.c b/dri

[PATCH 27/45] rtc: sirfsoc: remove useless sirfsoc_rtc_ioctl

2018-02-12 Thread Alexandre Belloni
sirfsoc_rtc_ioctl() doesn't implement any actual ioctl, remove it. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-sirfsoc.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/rtc/rtc-sirfsoc.c b/drivers/rtc/rtc-sirfsoc.c index 7367f617145c..2a9e151cae99 100644 -

[PATCH 26/45] rtc: m48t59: use generic nvmem

2018-02-12 Thread Alexandre Belloni
Instead of adding a binary sysfs attribute from the driver (which suffers from a race condition as the attribute appears after the device), use the core to register an nvmem device. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-m48t59.c | 56 ---

[PATCH 29/45] rtc: ds1553: use generic nvmem

2018-02-12 Thread Alexandre Belloni
Instead of adding a binary sysfs attribute from the driver (which suffers from a race condition as the attribute appears after the device), use the core to register an nvmem device. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1553.c | 55 +--

Re: [PATCH v2] libnvdimm: re-enable deep flush for pmem devices

2018-02-12 Thread Dan Williams
On Mon, Feb 12, 2018 at 1:46 PM, Dave Jiang wrote: > Re-enable deep flush so that users always have a way to be sure that a write > does make it all the way out to the NVDIMM. The PMEM driver writes always > make it "all the way to the NVDIMM", and it relies on the ADR mechanism to > flush the wri

[PATCH 30/45] rtc: ds1553: make alarms useful

2018-02-12 Thread Alexandre Belloni
Currently, the IRQs are disabled when the rtc driver is removed (e.g. when shutting down the platform). This means that the RTC will be unable to wakeup the platform. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1553.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/driv

[PATCH 23/45] rtc: ds1343: remove undocumented and useless sysfs files

2018-02-12 Thread Alexandre Belloni
A documented ABI already exists to get information about the alarm. It is the only one that is used. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1343.c | 96 +--- 1 file changed, 1 insertion(+), 95 deletions(-) diff --git a/drivers/rtc/rtc-

Re: linux-next: Signed-off-by missing for commits in the nand tree

2018-02-12 Thread Boris Brezillon
On Tue, 13 Feb 2018 09:31:53 +1100 Stephen Rothwell wrote: > Hi Boris, > > A whole series of commits > > 558783726c98 ("mtd: nand: mxc: reorder functions to avoid forward > declarations") > to > e385e291129e ("mtd: nand: mxc: remove now unused code") > > are missing a Signed-off-by from t

[PATCH 25/45] rtc: m48t59: switch to rtc_register_device

2018-02-12 Thread Alexandre Belloni
This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-m48t59.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c index d99a705bec07..e248e56ff8a1 100644 --- a/drivers/r

[PATCH 45/45] rtc: tx4939: use generic nvmem

2018-02-12 Thread Alexandre Belloni
Instead of adding a binary sysfs attribute from the driver, use the core to register an nvmem device. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-tx4939.c | 57 ++-- 1 file changed, 26 insertions(+), 31 deletions(-) diff --git a/drivers/rtc/r

[PATCH 41/45] rtc: tx4939: remove arch/mips dependency

2018-02-12 Thread Alexandre Belloni
Copy RTC definitions from arch/mips/include/asm/txx9/tx4939.h to the RTC driver so it doesn't depend on arch/mips anymore. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-tx4939.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-t

[PATCH 32/45] rtc: cmos: use generic nvmem

2018-02-12 Thread Alexandre Belloni
Instead of adding a binary sysfs attribute from the driver, use the core to register an nvmem device. This allows to use the in-kernel interface to access the nvram. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-cmos.c | 73 +- 1 file change

[PATCH 43/45] rtc: tx4939: switch to rtc_register_device

2018-02-12 Thread Alexandre Belloni
This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-tx4939.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-tx4939.c b/drivers/rtc/rtc-tx4939.c index 1f4013d8ae7b..75c3887fbc6c 100644 --- a/drivers

[PATCH 40/45] rtc: stk17ta8: use generic nvmem

2018-02-12 Thread Alexandre Belloni
Instead of adding a binary sysfs attribute from the driver, use the core to register an nvmem device. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-stk17ta8.c | 62 ++ 1 file changed, 24 insertions(+), 38 deletions(-) diff --git a/drivers/rtc/r

[PATCH 42/45] rtc: tx4939: extend test coverage

2018-02-12 Thread Alexandre Belloni
The rtc-tx4939 driver now compiles correctly on other architectures, add COMPILE_TEST to improve code coverage. Signed-off-by: Alexandre Belloni --- drivers/rtc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 8ab5f0a5d32

[PATCH 38/45] rtc: stk17ta8: switch to rtc_register_device

2018-02-12 Thread Alexandre Belloni
This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-stk17ta8.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta8.c index 39a80491e567..f936accf622f 100644 --- a/dri

[PATCH 36/45] rtc: rp5c01: use generic nvmem

2018-02-12 Thread Alexandre Belloni
Instead of adding a binary sysfs attribute from the driver, use the core to register an nvmem device. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-rp5c01.c | 63 ++-- 1 file changed, 24 insertions(+), 39 deletions(-) diff --git a/drivers/rtc/r

[PATCH 34/45] rtc: ds1742: use generic nvmem

2018-02-12 Thread Alexandre Belloni
Instead of adding a binary sysfs attribute from the driver (which suffers from a race condition as the attribute appears after the device), use the core to register an nvmem device. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1742.c | 67 +++

[PATCH 37/45] rtc: stk17ta8: make alarms useful

2018-02-12 Thread Alexandre Belloni
Currently, the IRQs are disabled when the rtc driver is removed (e.g. when shutting down the platform). This means that the RTC will be unable to wakeup the platform. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-stk17ta8.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff -

[PATCH 35/45] rtc: rp5c01: fix possible race condition

2018-02-12 Thread Alexandre Belloni
The probe function is not allowed to fail after registering the RTC because the following may happen: CPU0:CPU1: sys_load_module() do_init_module() do_one_initcall() cmos_do_probe() rtc_device_register() __register_chrdev() cdev->owner = struct m

[PATCH 39/45] rtc: stk17ta8: fix possible race condition

2018-02-12 Thread Alexandre Belloni
The probe function is not allowed to fail after registering the RTC. Call rtc_register_device() at the end. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-stk17ta8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-stk17ta8.c b/drivers/rtc/rtc-stk17ta

Re: [PATCH v2] libnvdimm: re-enable deep flush for pmem devices

2018-02-12 Thread Jeff Moyer
Dave Jiang writes: > Re-enable deep flush so that users always have a way to be sure that a write > does make it all the way out to the NVDIMM. The PMEM driver writes always > make it "all the way to the NVDIMM", and it relies on the ADR mechanism to > flush the write buffers on power failure. De

[PATCH 28/45] rtc: ds1553: switch to rtc_register_device

2018-02-12 Thread Alexandre Belloni
This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1553.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c index 9961ec646fd2..59eab5eceafa 100644 --- a/drivers/r

[PATCH 24/45] rtc: ds1343: use generic nvmem

2018-02-12 Thread Alexandre Belloni
Instead of adding a binary sysfs attribute from the driver (which suffers from a race condition as the attribute appears after the device), use the core to register an nvmem device. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1343.c | 66 +++

[PATCH 21/45] rtc: ds1343: simplify regmap initialization

2018-02-12 Thread Alexandre Belloni
Avoid using memset as gcc can properly initialize structures. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1343.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/rtc/rtc-ds1343.c b/drivers/rtc/rtc-ds1343.c index 895fbeeb47fe..b5102cdd7f61 100644 ---

[PATCH 20/45] rtc: remove nvmem_config

2018-02-12 Thread Alexandre Belloni
Because nvmem_config is only used and copied at nvmem registration, remove it from struct rtc_device. All the rtc drivers using nvmem are now calling rtc_nvmem_register directly. Signed-off-by: Alexandre Belloni --- drivers/rtc/class.c | 2 -- include/linux/rtc.h | 1 - 2 files changed, 3 delet

[PATCH 17/45] rtc: rv8803: call rtc_nvmem_register()

2018-02-12 Thread Alexandre Belloni
Call rtc_nvmem_register instead of letting the core do it and stop using the nvmem_config member of struct rtc_device. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-rv8803.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv

[PATCH 22/45] rtc: ds1343: switch to rtc_register_device

2018-02-12 Thread Alexandre Belloni
This allows for future improvement of the driver. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1343.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/rtc/rtc-ds1343.c b/drivers/rtc/rtc-ds1343.c index b5102cdd7f61..a5a5a363c6e1 100644 --- a/driv

[PATCH 18/45] rtc: rv8803: put struct nvmem_config on the stack

2018-02-12 Thread Alexandre Belloni
Avoid allocating memory for struct nvmem_config. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-rv8803.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c index c10132d8cf2e..6fb5041f750b 100644 --

[PATCH 19/45] rtc: rv8803: fix possible race condition

2018-02-12 Thread Alexandre Belloni
The probe function is not allowed to fail after registering the RTC. Call rtc_register_device() at the end. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-rv8803.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rt

[PATCH 16/45] rtc: pcf85363: put struct nvmem_config on the stack

2018-02-12 Thread Alexandre Belloni
Avoid allocating memory for struct nvmem_config. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-pcf85363.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/rtc/rtc-pcf85363.c b/drivers/rtc/rtc-pcf85363.c index a1fe833d2431..64573cccf7fe 10064

[PATCH 15/45] rtc: pcf85363: call rtc_nvmem_register()

2018-02-12 Thread Alexandre Belloni
Call rtc_nvmem_register instead of letting the core do it and stop using the nvmem_config member of struct rtc_device. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-pcf85363.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-pcf85363.c b/drivers/

[PATCH 08/45] rtc: ds1307: call rtc_nvmem_register()

2018-02-12 Thread Alexandre Belloni
Call rtc_nvmem_register instead of letting the core do it and stop using the nvmem_config member of struct rtc_device. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1307.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers

[PATCH 07/45] rtc: ds1305: put ds1305_nvmem_cfg on the stack

2018-02-12 Thread Alexandre Belloni
This makes to code safer on system using two similar RTCs. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1305.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c index affa90da26f1..3d2400a39da9 1006

[PATCH 09/45] rtc: ds1307: put struct nvmem_config on the stack

2018-02-12 Thread Alexandre Belloni
Avoid allocating memory for struct nvmem_config as it is only necessary at the nvmem registration. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1307.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1

[PATCH 14/45] rtc: omap: call rtc_nvmem_register()

2018-02-12 Thread Alexandre Belloni
Call rtc_nvmem_register instead of letting the core do it and stop using the nvmem_config member of struct rtc_device. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-omap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c

[PATCH 13/45] rtc: m48t86: put m48t86_nvmem_cfg on the stack

2018-02-12 Thread Alexandre Belloni
Move m48t86_nvmem_cfg to the stack of m48t86_rtc_probe. This results in a very small code size reduction and make it safer on systems with two similar RTCs: textdata bss dec hex filename 1733 164 01897 769 drivers/rtc/rtc-m48t86.o.before 1793 100

[PATCH 11/45] rtc: ds1511: put ds1511_nvmem_cfg on the stack

2018-02-12 Thread Alexandre Belloni
Move ds1511_nvmem_cfg to the stack of ds1511_rtc_probe. This results in a very small code size reduction and make it safer on systems with two similar RTCs: textdata bss dec hex filename 2128 164 42296 8f8 drivers/rtc/rtc-ds1511.o.before 2175 100

[PATCH 06/45] rtc: ds1305: call rtc_nvmem_register()

2018-02-12 Thread Alexandre Belloni
Call rtc_nvmem_register instead of letting the core do it and stop using the nvmem_config member of struct rtc_device. Signed-off-by: Alexandre Belloni --- drivers/rtc/rtc-ds1305.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-

<    4   5   6   7   8   9   10   11   >