[linux-yocto] [PATCH 14/14] spi: pxa2xx: Fix too early chipselect deassert

2016-06-16 Thread Weifeng Voon
running at its second half cycle. Fix this by adding a wait loop in giveback() that waits until SSP becomes idle before deasserting the chipselect. Reported-by: Weifeng Voon Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown (cherry picked from commit

[linux-yocto] [PATCH 12/14] spi: pxa2xx: Print actual DMA/PIO transfer mode in debug messages

2016-06-16 Thread Weifeng Voon
further in pump_transfers() where the actual transfer mode is known and use drv_data->dma_mapped flag instead of chip->enable_dma for printing the mode. Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown (cherry picked from commit ee03672d961bdac2ac1e593e9c29b0d3b7320409) Signed-off-by: Weifeng Vo

[linux-yocto] [PATCH 11/14] spi: atmel: remove warning when !CONFIG_PM_SLEEP

2016-06-16 Thread Weifeng Voon
) Signed-off-by: Weifeng Voon --- drivers/spi/spi-atmel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index a2f40b1..7e66634 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -1467,6 +1467,7 @@ static int

[linux-yocto] [PATCH 13/14] spi: pxa2xx: Update comment in int_transfer_complete()

2016-06-16 Thread Weifeng Voon
d-off-by: Weifeng Voon --- drivers/spi/spi-pxa2xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 227e8ba..9b9a528 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -572,7 +572,7 @@ static

[linux-yocto] [PATCH 08/14] spi: meson: Fix module autoload for OF platform driver

2016-06-16 Thread Weifeng Voon
igned-off-by: Weifeng Voon --- drivers/spi/spi-meson-spifc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-meson-spifc.c b/drivers/spi/spi-meson-spifc.c index 5468fc7..2465259 100644 --- a/drivers/spi/spi-meson-spifc.c +++ b/drivers/spi/spi-meson-spifc.c @@ -444,6 +444,7 @@ s

[linux-yocto] [PATCH 06/14] spi: bcm2835: fix overflow in calculation of transfer time

2016-06-16 Thread Weifeng Voon
0122a5183088e3117bb9c8fbe248914efb502f3f) Signed-off-by: Weifeng Voon --- drivers/spi/spi-bcm2835.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c index c9357bb..e7874a6 100644 --- a/drivers/spi/spi-bcm2835.c

[linux-yocto] [PATCH 10/14] spi: fix kernel-doc warnings in spi.h

2016-06-16 Thread Weifeng Voon
statistics' Signed-off-by: Geliang Tang Signed-off-by: Mark Brown (cherry picked from commit 0243ed44ad4a25dbd2e92ad97e5e12a1a6c72d6c) Signed-off-by: Weifeng Voon --- include/linux/spi/spi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/spi/spi.h b/includ

[linux-yocto] [PATCH 03/14] spi: bcm2835: enable dma modes for transfers meeting certain conditions

2016-06-16 Thread Weifeng Voon
Trønnes (private communication) Signed-off-by: Martin Sperl Signed-off-by: Mark Brown (cherry picked from commit 3ecd37edaa2a6ba3246e2c35714be9316b1087fe) Signed-off-by: Weifeng Voon --- drivers/spi/spi-bcm2835.c | 303 +- 1 file changed, 301 inser

[linux-yocto] [PATCH 09/14] spi: expose spi_master and spi_device statistics via sysfs

2016-06-16 Thread Weifeng Voon
that are handled immediately without a context switch to the spi_pump worker-thread Signed-off-by: Martin Sperl Signed-off-by: Mark Brown (cherry picked from commit eca2ebc7e007c9e2b8f5ecfcfc74b53fbe68e42b) Signed-off-by: Weifeng Voon --- drivers/spi/spi.c

[linux-yocto] [PATCH 07/14] spi: bcm2835: BUG: fix wrong use of PAGE_MASK

2016-06-16 Thread Weifeng Voon
- 1) should have been used instead. Also fixes a copy/paste error. Reported-by: Signed-off-by: Martin Sperl Signed-off-by: Mark Brown Cc: sta...@vger.kernel.org (cherry picked from commit 2a3fffd45822070309bcf0b1e1dae624d633824a) Signed-off-by: Weifeng Voon --- drivers/spi/spi-bcm2835.c | 6

[linux-yocto] [PATCH 04/14] spi: bcm2835: fix kbuild compile warnings/errors and a typo

2016-06-16 Thread Weifeng Voon
x_buff was checked twice instead of checking both rx and tx_buff. Reported by: Stephen Rothwell Signed-off-by: Martin Sperl Signed-off-by: Mark Brown (cherry picked from commit 7e52be0d576e8f7bc99a606f07b9d000c4340f04) Signed-off-by: Weifeng Voon --- drivers/spi/spi-bcm2835.c | 8 +-

[linux-yocto] [PATCH 01/14] spi: spi-pxa2xx: Remove unused legacy null dma buffer and allocation for it

2016-06-16 Thread Weifeng Voon
56ba96a028) Signed-off-by: Weifeng Voon --- drivers/spi/spi-pxa2xx.c | 4 +--- drivers/spi/spi-pxa2xx.h | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index c304f64..ab9914a 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drive

[linux-yocto] [PATCH 00/14] Backport SPI from mainline to linux-yocto-4.1

2016-06-16 Thread Weifeng Voon
This changeset from mainline are for BXT/APL. The commits are for linux-yocto4.1 standard/base branch. Alexandre Belloni (1): spi: atmel: remove warning when !CONFIG_PM_SLEEP Geliang Tang (1): spi: fix kernel-doc warnings in spi.h Jarkko Nikula (4): spi: spi-pxa2xx: Remove unused legacy nu

[linux-yocto] [PATCH 02/14] spi: bcm2835: fallback to interrupt for polling timeouts exceeding 2 jiffies

2016-06-16 Thread Weifeng Voon
picked from commit a750b124cfd27bae1a12df22318db5a2083dfb12) Signed-off-by: Weifeng Voon --- drivers/spi/spi-bcm2835.c | 87 +++ 1 file changed, 50 insertions(+), 37 deletions(-) diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c index

[linux-yocto] [PATCH 05/14] spi: bcm2835: bcm2835_dma_release() can be static

2016-06-16 Thread Weifeng Voon
From: kbuild test robot Signed-off-by: Fengguang Wu Signed-off-by: Mark Brown (cherry picked from commit 29ad1a7a9e08f1d2b6795c5278a0c0fd23679ded) Signed-off-by: Weifeng Voon --- drivers/spi/spi-bcm2835.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi

[linux-yocto] [PATCH 2/2] mfd: intel-lpss: Save register context on suspend

2016-06-16 Thread Weifeng Voon
) Cc: sta...@vger.kernel.org # v4.3+ Signed-off-by: Heikki Krogerus Signed-off-by: Lee Jones (cherry picked from commit 41a3da2b8e1639d983192e3650670df4ecc94cf7) Signed-off-by: Weifeng Voon --- drivers/mfd/intel-lpss.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion

[linux-yocto] [PATCH 1/2] mfd: intel-lpss: Pass I2C configuration via properties on BXT

2016-06-16 Thread Weifeng Voon
build-in device properties instead. Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones (cherry picked from commit 0343b2f4e4a52c907d7676ce3159e0b5e7f0301c) Signed-off-by: Weifeng Voon --- drivers/mfd/intel-lpss-acpi.c | 12 drivers/mfd/intel-lpss

[linux-yocto] [PATCH 0/2] Backport MFD from mainline to linux-yocto-4.1

2016-06-16 Thread Weifeng Voon
This changeset from mainline are for BXT/APL. The commits are for linux-yocto4.1 standard/base branch. Heikki Krogerus (1): mfd: intel-lpss: Save register context on suspend Mika Westerberg (1): mfd: intel-lpss: Pass I2C configuration via properties on BXT drivers/mfd/intel-lpss-acpi.c | 12

[linux-yocto] Backport SPI from mainline to linux-yocto-4.1

2016-04-11 Thread weifeng . voon
From: "Voon, Weifeng" This changeset from mainline (29 commits) are for BXT/APL. The commits are for linux-yocto4.1 standard/base branch. URL: https://github.com/wvoon/yocto-backport.git Branch:standard_base Andy Shevchenko (3): spi: pxa2xx: choose closest lower speed spi: pxa2xx: move debu

[linux-yocto] [PATCH 16/17] i2c: designware: Do not require clock when SSCN and FFCN are provided

2016-03-24 Thread weifeng . voon
From: Suravee Suthikulpanit The current driver uses input clock source frequency to calculate values for [SS|FS]_[HC|LC] registers. However, when booting ACPI, we do not currently have a good way to provide the frequency information. Instead, we can leverage the SSCN and FFCN ACPI methods, which

[linux-yocto] [PATCH 15/17] i2c: designware: retry transfer on transient failure

2016-03-24 Thread weifeng . voon
From: Baruch Siach Set the i2c_adapter retries field to a sensible value. This allows the i2c core to retry master_xfer() when it returns -EAGAIN. Currently the i2c-designware driver returns -EAGAIN only on Tx arbitration failure (DW_IC_TX_ARB_LOST). Reported-by: Rolland Chau Signed-off-by: Bar

[linux-yocto] [PATCH 17/17] i2c: designware: Convert to use unified device property API

2016-03-24 Thread weifeng . voon
From: Mika Westerberg With ACPI _DSD (introduced in ACPI v5.1) it is now possible to pass device configuration information from ACPI in addition to DT. In order to support this, convert the driver to use the unified device property accessors instead of DT specific. Change to ordering a bit so th

[linux-yocto] [PATCH 12/17] i2c: designware: Make dw_readl() and dw_writel() static

2016-03-24 Thread weifeng . voon
From: Jarkko Nikula dw_readl() and dw_writel() are not used outside of i2c-designware-core and they are not exported so make them static and remove their forward declaration. Signed-off-by: Jarkko Nikula Signed-off-by: Wolfram Sang (cherry picked from commit 8a437459523ad878c6c2bd3a7703b1b88fc

[linux-yocto] [PATCH 11/17] i2c: designware: Remove unused functions

2016-03-24 Thread weifeng . voon
From: Jarkko Nikula i2c_dw_is_enabled() became unused by the commit be58eda775c8 ("i2c: designware-pci: Cleanup driver power management") and i2c_dw_enable() by the commit 3a48d1c08fe0 ("i2c: prevent spurious interrupt on Designware controllers"). Signed-off-by: Jarkko Nikula Signed-off-by: Wol

[linux-yocto] [PATCH 09/17] i2c: designware: Remove interrupt clearing from i2c_dw_pci_probe()

2016-03-24 Thread weifeng . voon
From: Jarkko Nikula There is no need to clear interrupts in i2c_dw_pci_probe() since only place where interrupts are unmasked is i2c_dw_xfer_init() and there interrupts are always cleared after commit 2a2d95e9d6d2 ("i2c: designware: always clear interrupts before enabling them"). This allows to

[linux-yocto] [PATCH 13/17] i2c: designware: Rename platform driver probe and PM functions

2016-03-24 Thread weifeng . voon
From: Jarkko Nikula Make it easier to distinguish between i2c-designware-platdrv and i2c-designware-core functions and to be consistent with i2c-designware-pcidrv. Signed-off-by: Jarkko Nikula Signed-off-by: Wolfram Sang (cherry picked from commit 6ad6fde3970c98348e4201efc22c92be414c86a6) Sign

[linux-yocto] [PATCH 14/17] i2c: designware: Move common probe code into i2c_dw_probe()

2016-03-24 Thread weifeng . voon
From: Jarkko Nikula There is some code duplication in i2c-designware-platdrv and i2c-designware-pcidrv probe functions. What is even worse that duplication requires i2c_dw_xfer(), i2c_dw_func() and i2c_dw_isr() i2c-designware-core functions to be exported. Therefore move common code into new i2c

[linux-yocto] [PATCH 03/17] i2c: designware: fix IO timeout issue for AMD controller

2016-03-24 Thread weifeng . voon
From: Xiangliang Yu Because of some hardware limitation, AMD I2C controller can't trigger pending interrupt if interrupt status has been changed after clearing interrupt status bits. Then, I2C will lost interrupt and IO timeout. According to hardware design, this patch implements a workaround to

[linux-yocto] [PATCH 10/17] i2c: designware: Disable interrupts before requesting PCI device interrupt

2016-03-24 Thread weifeng . voon
From: Jarkko Nikula Device must not generate interrupts before registering the interrupt handler so move i2c_dw_disable_int() before requesting it. There are no known issues with this. The code has been here since commit fe20ff5c7e9c ("i2c-designware: Add support for Designware core behind PCI d

[linux-yocto] [PATCH 08/17] i2c: designware: Make debug print in i2c_dw_isr() shorter

2016-03-24 Thread weifeng . voon
From: Jarkko Nikula Printing adapter name is irrelevant from this debug print and makes output needlessly long. Having already device and functions names printed here is enough for debugging. While at it remove extra space from "enabled= 0x" and use "%#x" for printing "0x" prefixed hexadecimal v

[linux-yocto] [PATCH 04/17] i2c: designware: Add support for AMD Seattle I2C

2016-03-24 Thread weifeng . voon
From: Suravee Suthikulpanit Add device HID AMDI0510 to match the I2C controlers on AMD Seattle platform Signed-off-by: Suravee Suthikulpanit Signed-off-by: Wolfram Sang (cherry picked from commit 90708ce22b4849194d195bad128e94a110426434) Signed-off-by: Voon, Weifeng Conflicts: driver

[linux-yocto] [PATCH 07/17] i2c: designware-pci: use IRQF_COND_SUSPEND flag

2016-03-24 Thread weifeng . voon
From: Andy Shevchenko The mentioned flag fixes a warning on Intel Edison board since one of the I2C controller shares IRQ line with watchdog timer. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Wolfram Sang (cherry picked from commit b0898fdaffb2932aba0108986b90d9d69

[linux-yocto] [PATCH 01/17] i2c: designware: use to_pci_dev()

2016-03-24 Thread weifeng . voon
From: Geliang Tang Use to_pci_dev() instead of open-coding it. Signed-off-by: Geliang Tang Reviewed-by: Andy Shevchenko Signed-off-by: Wolfram Sang (cherry picked from commit 238c44a70c0637765709c78eeaddb2a3d3674b88) Signed-off-by: Voon, Weifeng --- drivers/i2c/busses/i2c-designware-pcidrv.

[linux-yocto] [PATCH 06/17] i2c: designware: Avoid unnecessary resuming during system suspend

2016-03-24 Thread weifeng . voon
From: Jisheng Zhang Commit 1fc2fe204cb9 ("i2c: designware: Add runtime PM hooks") adds runtime pm support using the same ops for system pm and runtime pm. When suspend to ram, the i2c host may have been runtime suspended, thus i2c_dw_disable() hangs. Previously, I fixed this issue by separating

[linux-yocto] [PATCH 05/17] i2c: dw: Add APM X-Gene ACPI I2C device support

2016-03-24 Thread weifeng . voon
From: Loc Ho Enable APM X-Gene ACPI I2C device support by adding the corresponding ACPI ID. The platform ACPI APD corresponding change is required to provide the proper clock frequency input. Signed-off-by: Loc Ho Acked-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki (cherry picked from

[linux-yocto] [PATCH 02/17] i2c: designware: reverts "i2c: designware: Add support for AMD I2C controller"

2016-03-24 Thread weifeng . voon
From: Ken Xue The patch reverts commit a445900c9060 (i2c: designware: Add support for AMD I2C controller). It never worked anyhow because it did not register a proper clkdev. Since kernel 4.1 starts to support APD, there is no need to get freq from id->driver_data for AMD0010. clkdev is supposed

[linux-yocto] [PATCH 00/17] i2c: designware: Backport i2c patches to 4.1

2016-03-24 Thread weifeng . voon
From: "Voon, Weifeng" This i2c patches are needed to be backported to enable Apollo Lake/Broxton This patches are from mainline and targeted for linux-yocto-4.1 on standard/base branch Andy Shevchenko (1): i2c: designware-pci: use IRQF_COND_SUSPEND flag Baruch Siach (1): i2c: designware: r

[linux-yocto] [PATCH 12/12] driver core: platform: Add support for built-in device properties

2016-03-22 Thread weifeng . voon
From: Mika Westerberg Make it possible to pass built-in device properties to platform device drivers. This is useful if the system does not have any firmware interface like Device Tree or ACPI which provides these. Properties associated with the platform device will be automatically released whe

[linux-yocto] [PATCH 11/12] mfd: core: propagate device properties to sub devices drivers

2016-03-22 Thread weifeng . voon
From: Andy Shevchenko In the similar way like we do for the platform data we propagate the device properties. For example, in case of Intel LPSS drivers we may provide a specific property to tell the actual device driver an additional information such as platform name. Signed-off-by: Andy Shevch

[linux-yocto] [PATCH 09/12] PM / QoS: Make it possible to expose device latency tolerance to userspace

2016-03-22 Thread weifeng . voon
From: Mika Westerberg Typically when a device is created the bus core it belongs to (for example PCI) does not know if the device supports things like latency tolerance. This is left to the driver that binds to the device in question. However, at that time the device has already been created and

[linux-yocto] [PATCH 07/12] mfd: intel-lpss: Pass HSUART configuration via properties

2016-03-22 Thread weifeng . voon
From: Andy Shevchenko The HS-UART host controller driver needs to know certain properties like width of the register set if it cannot get that information from ACPI or DT. In order to support non-ACPI systems we pass this information to the driver via device properties. Signed-off-by: Mika Weste

[linux-yocto] [PATCH 08/12] driver core: implement device_for_each_child_reverse()

2016-03-22 Thread weifeng . voon
From: Andy Shevchenko The new function device_for_each_child_reverse() is helpful to traverse the registered devices in a reversed order, e.g. in the case when an operation on each device should be done first on the last added device, then on one before last and so on. Signed-off-by: Andy Shevch

[linux-yocto] [PATCH 10/12] klist: implement klist_prev()

2016-03-22 Thread weifeng . voon
From: Andy Shevchenko klist_prev() gets the previous element in the list. It is useful to traverse through the list in reverse order, for example, to provide LIFO (last in first out) variant of access. Signed-off-by: Andy Shevchenko Acked-by: Greg Kroah-Hartman Signed-off-by: Lee Jones (cherr

[linux-yocto] [PATCH 05/12] mfd: intel-lpss: Add support for passing device properties

2016-03-22 Thread weifeng . voon
From: Mika Westerberg If the boot firmware does not support ACPI we need a way to pass device configuration information to the drivers. The unified device properties API already supports passing platform data via properties so let's take advantage of that and allow probe drivers to pass set of pr

[linux-yocto] [PATCH 03/12] mfd: lpss: Add Intel Broxton PCI IDs

2016-03-22 Thread weifeng . voon
From: Andy Shevchenko Intel Broxton has the same LPSS block than Intel Sunrisepoint so add Broxton PCI IDs to the list. Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones (cherry picked from commit ff0a04a699b9ea9b795208baff2ae727a6a3085a) Signed-off-by: Vo

[linux-yocto] [PATCH 06/12] mfd: intel-lpss: Pass SDA hold time to I2C host controller driver

2016-03-22 Thread weifeng . voon
From: Mika Westerberg Intel Skylake the LPSS I2C pad circuit has internal delays that require programming non-zero SDA hold time for the I2C host controller. If this is not done communication to slave devices may fail with arbitration lost errors like the one seen below taken from Lenovo Yoga 900

[linux-yocto] [PATCH 02/12] mfd: intel-lpss: Use writeq() helper

2016-03-22 Thread weifeng . voon
From: Andy Shevchenko There are already helper functions to do 64-bit I/O on 32-bit machines, thus we don't need to reinvent the wheel. In our case we can't use readq() / writeq() even on 64-bit kernel since there is a hardware limitation (OCP bus is a 32-bit bus). Signed-off-by: Andy Shevchenko

[linux-yocto] [PATCH 04/12] mfd: lpss: Add Broxton ACPI IDs

2016-03-22 Thread weifeng . voon
From: Mika Westerberg Intel Broxton has the same LPSS block than Intel Sunrisepoint so add Broxton ACPI IDs to the list. Signed-off-by: Mika Westerberg Signed-off-by: Andy Shevchenko Signed-off-by: Lee Jones (cherry picked from commit 6a636ec0ab19c64e83d1008a80606e1030a0c422) Signed-off-by: V

[linux-yocto] [PATCH 00/12] MFD : Backport MFD patches to 4.1

2016-03-22 Thread weifeng . voon
From: "Voon, Weifeng" This "MFD" patches needed to backport for Apollo Lake/Broxton This patches are from mainline and will have dependencies on the previous 2 patches title: "device property : Backport device property patches to 4.1" "device property : More backport device property patches to

[linux-yocto] [PATCH 01/12] mfd: Add support for Intel Sunrisepoint LPSS devices

2016-03-22 Thread weifeng . voon
From: Andy Shevchenko The new coming Intel platforms such as Skylake will contain Sunrisepoint PCH. The main difference to the previous platforms is that the LPSS devices are compound devices where usually main (SPI, HSUART, or I2C) and DMA IPs are present. This patch brings the driver for such

[linux-yocto] [PATCH 10/12] device property: add spaces to PROPERTY_ENTRY_STRING macro

2016-03-22 Thread weifeng . voon
From: Andy Shevchenko Just a style fix, no functional changes. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki (cherry picked from commit aace7367bf83aef7baa021c7bcc9d2e331b040aa) Signed-off-by: Voon, Weifeng --- include/linux/property.h | 2 +- 1 file changed, 1 insertion(+)

[linux-yocto] [PATCH 12/12] device property: avoid allocations of 0 length

2016-03-22 Thread weifeng . voon
From: Andy Shevchenko Arrays can not have zero elements by definition of the unified device properties. If such property comes from outside we should not allow it to pass. Otherwise memory allocation on 0 length will return non-NULL value, which we currently don't check. Prevent memory allocatio

[linux-yocto] [PATCH 09/12] include/linux/property.h: fix build issues with gcc-4.4.4

2016-03-22 Thread weifeng . voon
From: Andrew Morton gcc-4.4.4 has problems with initialization of anonymous unions: drivers/mfd/intel-lpss-acpi.c:30: error: unknown field 'value' specified in initializer work around this by crafting the initializers in a manner which the compiler can handle. Signed-off-by: Andrew Morton Si

[linux-yocto] [PATCH 11/12] device property: the secondary fwnode needs to depend on the primary

2016-03-22 Thread weifeng . voon
From: Heikki Krogerus This fixes NULL pointer dereference when the primary fwnode handle does not exist, for example with PCI devices that do not have ACPI companion. Signed-off-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki (cherry picked from commit 0fb5

[linux-yocto] [PATCH 07/12] device property: Fallback to secondary fwnode if primary misses the property

2016-03-22 Thread weifeng . voon
From: Andy Shevchenko The struct fwnode has notion of secondary fwnode. This is supposed to used as fallback if the primary firmware interface (DT, ACPI) does not have the property in question. However, the current implementation never checks the secondary node which prevents one to add default

[linux-yocto] [PATCH 08/12] device property: Take a copy of the property set

2016-03-22 Thread weifeng . voon
From: Mika Westerberg It is convenient if the property set associated with the device secondary firmware node is a copy of the original. This allows passing property set from a stack for example for devices created dynamically. This also ties the property set lifetime to the associated device. B

[linux-yocto] [PATCH 03/12] device property: keep single value inplace

2016-03-22 Thread weifeng . voon
From: Andy Shevchenko We may save a lot of lines of code and space by keeping single values inside the struct property_entry. Refactor the implementation to do so. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki (cherry picked from commit 66586baba56679baa2da1a10a96ccf15b1e96b9

[linux-yocto] [PATCH 05/12] device property: Add fwnode_property_match_string()

2016-03-22 Thread weifeng . voon
From: Mika Westerberg Sometimes it is useful to be able to extract an index of certain string value from an array of strings. A typical use case is to give a name to a DMA channel, PWM, clock and so on. Provide an implementation using unified device property accessors that follows of_property_ma

[linux-yocto] [PATCH 04/12] device property: helper macros for property entry creation

2016-03-22 Thread weifeng . voon
From: Heikki Krogerus Marcos for easier creation of build-in property entries. Signed-off-by: Heikki Krogerus Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki (cherry picked from commit a85f420475334caed12b057ddcaa0b58e0b1ebb7) Signed-off-by: Voon, Weifeng --- include/linux/p

[linux-yocto] [PATCH 06/12] device property: improve readability of macros

2016-03-22 Thread weifeng . voon
From: Andy Shevchenko There is no functional change. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki (cherry picked from commit 1d656fb757c17e48a8a01bd576d14918701ba55c) Signed-off-by: Voon, Weifeng --- drivers/base/property.c | 28 ++-- include/linux

[linux-yocto] [PATCH 01/12] device property: rename helper functions

2016-03-22 Thread weifeng . voon
From: Andy Shevchenko To be in align with the rest of fwnode types we rename the built-in property set ones, i.e. is_pset() -> is_pset_node() to_pset() -> to_pset_node() There is no functional change. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki (cherry pick

[linux-yocto] [PATCH 02/12] device property: refactor built-in properties support

2016-03-22 Thread weifeng . voon
From: Andy Shevchenko Instead of using the type and nval fields we will use length (in bytes) of the value. The sanity check is done in the accessors. The built-in property accessors are split in the same way such as device tree. Signed-off-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki

[linux-yocto] [PATCH 00/12] device property : More backport device property patches to 4.1

2016-03-22 Thread weifeng . voon
From: "Voon, Weifeng" More "device property" patches needed to backport for Apollo Lake/Broxton. This patches are from mainline and can only be apply after the previous patch title:"device property : Backport device property patches to 4.1" goes into the standard/base branch. The patches are ta

[linux-yocto] [PATCH 09/11] ACPI / property: Extend fwnode_property_* to data-only subnodes

2016-03-20 Thread weifeng . voon
From: "Rafael J. Wysocki" Modify is_acpi_node() to return "true" for ACPI data-only subnodes as well as for ACPI device objects and change the name of to_acpi_node() to to_acpi_device_node() so it is clear that it covers ACPI device objects only. Accordingly, introduce to_acpi_data_node() to cov

[linux-yocto] [PATCH 10/11] device property: fallback to pset when gettng one string

2016-03-20 Thread weifeng . voon
From: Andy Shevchenko The one string as an equivalent to an array of one element. Allow user to read one string as a plain string. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki (cherry picked from commit 4f73b0654d8a954540d49bb0a300f31663423db9)

[linux-yocto] [PATCH 11/11] device property: always check for fwnode type

2016-03-20 Thread weifeng . voon
From: Andy Shevchenko Currently the property accessors unconditionally fall back to built-in property set as a last resort. Make this strict and return an error in case the type of fwnode is unknown. This is actually a follow up to the commit 4fa7508e9f1c (device property: Return -ENXIO if there

[linux-yocto] [PATCH 03/11] ACPI / scan: Parse _CCA and setup device coherency

2016-03-20 Thread weifeng . voon
From: "Suthikulpanit, Suravee" This patch implements support for ACPI _CCA object, which is introduced in ACPIv5.1, can be used for specifying device DMA coherency attribute. The parsing logic traverses device namespace to parse coherency information, and stores it in acpi_device_flags. Then use

[linux-yocto] [PATCH 05/11] device property: attach 'else if' to the proper 'if'

2016-03-20 Thread weifeng . voon
From: Andy Shevchenko Obviously in the current place the 'else' keyword is redundant, though it seems quite correct when we check if nval is in allowed range. Reattach the condition branch there. Signed-off-by: Andy Shevchenko Reviewed-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki (ch

[linux-yocto] [PATCH 04/11] ACPI / OF: Rename of_node() and acpi_node() to to_of_node() and to_acpi_node()

2016-03-20 Thread weifeng . voon
From: Alexander Sverdlin Commit 8a0662d9 introduced of_node and acpi_node symbols in global namespace but there were already ~63 of_node local variables or function parameters (no single acpi_node though, but anyway). After debugging undefined but used of_node local varible (which turned out to

[linux-yocto] [PATCH 07/11] ACPI / property: Add routine for extraction of _DSD properties

2016-03-20 Thread weifeng . voon
From: "Rafael J. Wysocki" Move the extraction of _DSD properties from acpi_init_properties() to a separate routine called acpi_extract_properties() to make the subsequent changes more straightforward. Signed-off-by: Rafael J. Wysocki Tested-by: Mika Westerberg (cherry picked from commit bd8191

[linux-yocto] [PATCH 08/11] ACPI / property: Add support for data-only subnodes

2016-03-20 Thread weifeng . voon
From: "Rafael J. Wysocki" In some cases, the information expressed via device properties is hierarchical by nature. For example, the properties of a composite device consisting of multiple semi-dependent components may need to be represented in the form of a tree of property data sets correspond

[linux-yocto] [PATCH 06/11] device property: Return -ENXIO if there is no suitable FW interface

2016-03-20 Thread weifeng . voon
From: Guenter Roeck Return -ENXIO if device property array access functions don't find a suitable firmware interface. This lets drivers decide if they should use available platform data instead. Cc: Rafael J. Wysocki Signed-off-by: Guenter Roeck Tested-by: Jeremy Linton Signed-off-by: David

[linux-yocto] [PATCH 02/11] ACPI / property: Define a symbol for PRP0001

2016-03-20 Thread weifeng . voon
From: "Rafael J. Wysocki" Use a #defined symbol ACPI_DT_NAMESPACE_HID instead of the PRP0001 string. Signed-off-by: Rafael J. Wysocki Acked-by: Mika Westerberg Reviewed-by: Hanjun Guo (cherry picked from commit ee89209402e0b9a733169901063afdf0ae7909db) Signed-off-by: Voon, Weifeng --- drive

[linux-yocto] [PATCH 01/11] ACPI / property: Refine consistency check for PRP0001

2016-03-20 Thread weifeng . voon
From: "Rafael J. Wysocki" Refine the check for the presence of the "compatible" property if the PRP0001 device ID is present in the device's list of ACPI/PNP IDs to also print the message if _DSD is missing entirely or the format of it is incorrect. One special case to take into accout is that t

[linux-yocto] [PATCH 00/11] device property : Backport device property patches to 4.1

2016-03-20 Thread weifeng . voon
From: "Voon, Weifeng" The patch is the "device property" backport for Apollo Lake/Broxton. Patch "device property: always check for fwnode type" is from mainline. The other patches is to make sure the patch apply cleanly. The patches are targeted for linux-yocto-4.1 on standard/base branch. Al