Re: [linux-yocto] [PULL REQUEST] Intel Axxia updates to linux-yocto-4.1
On 2016-07-21 1:24 PM, Daniel Dragomir wrote: Hello Bruce! This series of patches brings various improvements to the Intel Axxia drivers from linux-yocto-4.1, including NCR, USB, PEI, FEMAC and also some DTB updates. Please pull the patches from https://github.com/axxia/axxia_yocto_linux_4.1_pull.git into git://git.yoctoproject.org/linux-yocto-4.1 Pull standard/axxia/base-1.35 -> standard/axxia/base standard/preempt-rt/axxia/base-1.35 -> standard/preempt-rt/axxia/base If you add more patches to standard/(preempt-rt)/axxia/base beforehand please notify me. I will rebase our changes so you can do a clean, fast-forward pull. I grabbed this right away, and it was a ff merge. So all is good. These are now merged, and pushed to the repo. Bruce Thank you, Daniel Dragomir John Jacques (8): drivers/net: Update the AXXIA FEMAC Driver drivers/net: Avoid Possible Deadlock in the Axxia FEMAC Driver arch/arm64: Update the Axxia Simulation Device Trees drivers/usb: Remove Debug Prints from the Axxia DWC3 Driver axxia: Handle PEIn Setup in Linux drivers/misc: Update NCR and APB2SER Access for 5600 arch/arm64: Add i2c to the Victoria Device Tree drivers/usb/dwc3: Add Quirk for Axxia Hardware arch/arm64/boot/dts/intel/axm5604-sim.dts | 10 - arch/arm64/boot/dts/intel/axm5608-sim.dts | 10 - arch/arm64/boot/dts/intel/axm5616-sim.dts | 10 - arch/arm64/boot/dts/intel/axm5616-victoria.dts | 16 + arch/arm64/boot/dts/intel/axm56xx.dtsi | 10 +- drivers/misc/Kconfig |8 +- drivers/misc/Makefile |1 + drivers/misc/axxia-pei.c | 1449 drivers/misc/lsi-ncr.c | 730 ++-- drivers/net/ethernet/lsi/Makefile |1 + drivers/net/ethernet/lsi/lsi-femac.c | 1199 drivers/net/ethernet/lsi/lsi_acp_net.h |4 +- drivers/pci/host/pcie-axxia.c | 27 +- drivers/usb/dwc3/core.c|5 + drivers/usb/dwc3/core.h|2 + drivers/usb/dwc3/dwc3-axxia.c |9 +- include/linux/axxia-pei.h | 24 + include/linux/lsi-ncr.h| 15 +- 18 files changed, 3141 insertions(+), 389 deletions(-) create mode 100644 drivers/misc/axxia-pei.c create mode 100644 drivers/net/ethernet/lsi/lsi-femac.c create mode 100644 include/linux/axxia-pei.h -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
Re: [linux-yocto] [PATCH 00/10] pwm related fixes for standard/intel/* branches
On 2016-07-21 7:47 PM, California Sullivan wrote: The drm forklift brought in some changes to structs and enums used by PWM drivers. These drivers didn't get updated, causing them to fail compilation. This set of backports updates the drivers to use the new structs and methods and fixes compilation. merged to standard/intel/base and standard/intel/bxt-rebase. Bruce This set of patches is also available at ssh://g...@git.yoctoproject.org/linux-yocto-contrib -b clsulliv/pwm-fix Boris BREZILLON (3): UPSTREAM: backlight: pwm_bl: Remove useless call to pwm_set_period() UPSTREAM: backlight: lm3630a_bl: Stop messing with the pwm->period field UPSTREAM: pwm: rcar: Make use of pwm_is_enabled() Boris Brezillon (4): UPSTREAM: backlight: pwm_bl: Use pwm_get_args() where appropriate UPSTREAM: clk: pwm: Use pwm_get_args() where appropriate UPSTREAM: pwm: Use pwm_get/set_xxx() helpers where appropriate UPSTREAM: hwmon: pwm-fan: Use pwm_get_args() where appropriate Philipp Zabel (2): UPSTREAM: backlight: pwm_bl: Avoid backlight flicker when probed from DT UPSTREAM: backlight: pwm_bl: Fix broken PWM backlight for non-dt platforms Vladimir Zapolskiy (1): UPSTREAM: backlight: pwm_bl: Free PWM requested by legacy API on error path drivers/clk/clk-pwm.c| 17 ++- drivers/hwmon/pwm-fan.c | 26 -- drivers/pwm/pwm-crc.c| 2 +- drivers/pwm/pwm-lpc18xx-sct.c| 2 +- drivers/pwm/pwm-rcar.c | 2 +- drivers/pwm/pwm-sun4i.c | 3 ++- drivers/video/backlight/lm3630a_bl.c | 3 +-- drivers/video/backlight/pwm_bl.c | 42 ++-- 8 files changed, 73 insertions(+), 24 deletions(-) -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
Re: [linux-yocto] [PATCH] drivers/mfd/pca9685-pwm.c: Update to reflect changes in patches from upstream
On 2016-07-21 3:21 PM, Saul Wold wrote: There are some patches brought into to 4.4 from upstream that change the pwm structure and move period and duty_cycle into a state structure so fix these up. Additional address the removal of PWMF_ENABLED in favor checking the state via pwm_is_enabled(). What branch is the target for this ? I could hunt around and figure it out, but I wanted to check with you as well. I had a quick look and the pca9685-pwm.c is quite a bit different in the latest kernel (i.e. it is under drivers/pwm/pwm-pca9685.c) .. so I assume that given your description, there isn't an upstream fix for this and the file / routines in question are unique to the BSP support in linux-yocto ? If so, I guess I won't ask if this is already fixed upstream. We could split the patch into the pwm struct fix, and the state change .. but I won't insist, since it already looks this is being stacked onto other pending patches for usptream. Bruce Signed-off-by: Saul Wold--- drivers/mfd/pca9685-pwm.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mfd/pca9685-pwm.c b/drivers/mfd/pca9685-pwm.c index 0c05263..3a79c33 100644 --- a/drivers/mfd/pca9685-pwm.c +++ b/drivers/mfd/pca9685-pwm.c @@ -80,16 +80,16 @@ int pca9685_update_prescale(struct pca9685 *pca, unsigned period_ns, if (reconfigure_channels) { for (i = 0; i < pca->pwm_chip.npwm; i++) { pwm = >pwm_chip.pwms[i]; - pwm->period = period_ns; - if (pwm->duty_cycle > 0) { + pwm->state.period = period_ns; + if (pwm->state.duty_cycle > 0) { /* Scale the rise time to maintain duty cycle */ duty_scale = period_ns; duty_scale *= 100; do_div(duty_scale, pca->pwm_period); - new_duty_ns = duty_scale * pwm->duty_cycle; + new_duty_ns = duty_scale * pwm->state.duty_cycle; do_div(new_duty_ns, 100); /* Update the duty_cycle */ - pwm_config(pwm, (int)new_duty_ns, pwm->period); + pwm_config(pwm, (int)new_duty_ns, pwm->state.period); } } } @@ -159,7 +159,7 @@ static int pca9685_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, /* Changing PWM period for a single channel at run-time not allowed. * The PCA9685 PWM clock is shared across all PWM channels */ - if (unlikely(period_ns != pwm->period)) + if (unlikely(period_ns != pwm->state.period)) return -EPERM; if (unlikely(pwm->hwpwm >= PCA9685_MAXCHAN)) { @@ -180,7 +180,7 @@ static int pca9685_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, else /* clear the LED_FULL bit */ regmap_write(pca->regmap, reg_on_h, 0x00); - full_off = !test_bit(PWMF_ENABLED, >flags) << 4; + full_off = !pwm_is_enabled(pwm); regmap_write(pca->regmap, reg_off_l, (int)duty & 0xff); @@ -246,7 +246,7 @@ static int pca9685_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) (gpiochip_is_requested(gpio_chip, channel))) return -EBUSY; - pwm->period = pca->pwm_period; + pwm->state.period = pca->pwm_period; return 0; } -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
Re: [linux-yocto] [PATCH] features/powertop: To provide wakeup/seconds events
Thanks Saul for your comment. We will check if this can help us & revisit the requirement if needs. Regards, Nilesh -Original Message- From: Saul Wold [mailto:s...@linux.intel.com] Sent: Thursday, July 21, 2016 12:27 AM To: Bacchewar, Nilesh; linux-yocto@yoctoproject.org Subject: Re: [linux-yocto] [PATCH] features/powertop: To provide wakeup/seconds events On Wed, 2016-07-20 at 16:20 -0700, Nilesh Bacchewar wrote: > > for powertop to provide wakeup/seconds events > > Signed-off-by: Nilesh Bacchewar > --- > features/powertop/powertop.cfg | 5 + > features/soc/broxton/broxton.scc | 2 ++ > 2 files changed, 7 insertions(+) > create mode 100644 features/powertop/powertop.cfg > > diff --git a/features/powertop/powertop.cfg > b/features/powertop/powertop.cfg new file mode 100644 index > 000..922a731 > --- /dev/null > +++ b/features/powertop/powertop.cfg > @@ -0,0 +1,5 @@ > +# make debugging options available > +CONFIG_DEBUG_KERNEL=y > + I thought that the Ostro team did not want DEBUG_KERNEL enabled, I realize that it might be required for TIMER_STATS, but I think you would want to enable this via the developer kernel, rather than the -standard kernel, this is why there is a split. TIMER_STATS is already part of the -developer kernel via the profiling.scc I think I would rather see the -developer kernel be used for validation, if that's what your trying to do, instead of polluting the -standard kernel with DEBUG items. Sau! > > +# Collect kernel timers statistics > +CONFIG_TIMER_STATS=y > diff --git a/features/soc/broxton/broxton.scc > b/features/soc/broxton/broxton.scc > index 8e268e5..aea7bbd 100644 > --- a/features/soc/broxton/broxton.scc > +++ b/features/soc/broxton/broxton.scc > @@ -14,4 +14,6 @@ include features/usb/designware-usb3.scc > include features/intel-pinctrl/intel-pinctrl.scc > include features/usb/usb-typec.scc > > +include features/powertop/powertop.scc > + > kconf hardware broxton.cfg > -- > 1.9.1 > -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
Re: [linux-yocto] [PATCH 5/6] [UPSTREAMED] acpi: add support for configfs
In an allmodconfig build I found that configfs (CONFIG_ACPI_CONFIGFS=m introduced in this patch) fails to compile on both standard/intel/base and standard/intel/bxt-rebase branches. Sebastien, could you look into what it takes to fix this? Thanks, Cal Sullivan On 07/11/2016 03:35 PM, Sebastien Boeuf wrote: > From: Octavian Purdila> > Register the ACPI subsystem with configfs. > > Patch slightly modified because of cherry-pick conflict > in Makefile. > > Signed-off-by: Octavian Purdila > Signed-off-by: Sebastien Boeuf > > Conflicts: > drivers/acpi/Makefile > --- > Documentation/ABI/testing/configfs-acpi | 7 + > MAINTAINERS | 1 + > drivers/acpi/Kconfig| 9 ++ > drivers/acpi/Makefile | 1 + > drivers/acpi/configfs.c | 53 > + > 5 files changed, 71 insertions(+) > create mode 100644 Documentation/ABI/testing/configfs-acpi > create mode 100644 drivers/acpi/configfs.c > > diff --git a/Documentation/ABI/testing/configfs-acpi > b/Documentation/ABI/testing/configfs-acpi > new file mode 100644 > index 000..17b19dc > --- /dev/null > +++ b/Documentation/ABI/testing/configfs-acpi > @@ -0,0 +1,7 @@ > +What:/config/acpi > +Date:July 2016 > +KernelVersion: 4.8 > +Contact: linux-a...@vger.kernel.org > +Description: > + This represents the ACPI subsystem entry point directory. It > + contains sub-groups corresponding to ACPI configurable options. > diff --git a/MAINTAINERS b/MAINTAINERS > index be51c13..278c0f4 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -279,6 +279,7 @@ F:include/linux/acpi.h > F: include/acpi/ > F: Documentation/acpi/ > F: Documentation/ABI/testing/sysfs-bus-acpi > +F: Documentation/ABI/testing/configfs-acpi > F: drivers/pci/*acpi* > F: drivers/pci/*/*acpi* > F: drivers/pci/*/*/*acpi* > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig > index 1741c68..daa9c90 100644 > --- a/drivers/acpi/Kconfig > +++ b/drivers/acpi/Kconfig > @@ -516,4 +516,13 @@ config BXT_WC_PMIC_OPREGION > > endif > > +config ACPI_CONFIGFS > + tristate "ACPI configfs support" > + select CONFIGFS_FS > + default n > + help > + Select this option to enable support for ACPI configuration from > + userspace. The configurable ACPI groups will be visible under > + /config/acpi, assuming configfs is mounted under /config. > + > endif# ACPI > diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile > index ad48a9e..dcccf2e 100644 > --- a/drivers/acpi/Makefile > +++ b/drivers/acpi/Makefile > @@ -97,5 +97,6 @@ obj-$(CONFIG_PMIC_OPREGION) += pmic/intel_pmic.o > obj-$(CONFIG_CRC_PMIC_OPREGION) += pmic/intel_pmic_crc.o > obj-$(CONFIG_XPOWER_PMIC_OPREGION) += pmic/intel_pmic_xpower.o > obj-$(CONFIG_BXT_WC_PMIC_OPREGION) += pmic/intel_pmic_bxtwc.o > +obj-$(CONFIG_ACPI_CONFIGFS) += configfs.o > > video-objs += acpi_video.o video_detect.o > diff --git a/drivers/acpi/configfs.c b/drivers/acpi/configfs.c > new file mode 100644 > index 000..44a72ff > --- /dev/null > +++ b/drivers/acpi/configfs.c > @@ -0,0 +1,53 @@ > +/* > + * ACPI configfs support > + * > + * Copyright (c) 2015 Intel Corporation > + * > + * This program is free software; you can redistribute it and/or modify it > + * under the terms of the GNU General Public License version 2 as published > by > + * the Free Software Foundation. > + */ > + > +#include > +#include > +#include > +#include > + > +static struct config_item_type acpi_root_group_type = { > + .ct_owner = THIS_MODULE, > +}; > + > +static struct configfs_subsystem acpi_configfs = { > + .su_group = { > + .cg_item = { > + .ci_namebuf = "acpi", > + .ci_type = _root_group_type, > + }, > + }, > + .su_mutex = __MUTEX_INITIALIZER(acpi_configfs.su_mutex), > +}; > + > +static int __init acpi_configfs_init(void) > +{ > + int ret; > + struct config_group *root = _configfs.su_group; > + > + config_group_init(root); > + > + ret = configfs_register_subsystem(_configfs); > + if (ret) > + return ret; > + > + return 0; > +} > +module_init(acpi_configfs_init); > + > +static void __exit acpi_configfs_exit(void) > +{ > + configfs_unregister_subsystem(_configfs); > +} > +module_exit(acpi_configfs_exit); > + > +MODULE_AUTHOR("Octavian Purdila "); > +MODULE_DESCRIPTION("ACPI configfs support"); > +MODULE_LICENSE("GPL v2"); -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 07/10] UPSTREAM: clk: pwm: Use pwm_get_args() where appropriate
From: Boris BrezillonThe PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon Acked-by: Stephen Boyd Signed-off-by: Thierry Reding (cherry picked from commit dd0b38b7ca0d8c8aadcf8a17d7c90d36ab8ab6e4) Signed-off-by: California Sullivan --- drivers/clk/clk-pwm.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/clk/clk-pwm.c b/drivers/clk/clk-pwm.c index 328fcfc..9897eb1 100644 --- a/drivers/clk/clk-pwm.c +++ b/drivers/clk/clk-pwm.c @@ -59,6 +59,7 @@ static int clk_pwm_probe(struct platform_device *pdev) struct clk_init_data init; struct clk_pwm *clk_pwm; struct pwm_device *pwm; + struct pwm_args pargs; const char *clk_name; struct clk *clk; int ret; @@ -71,22 +72,28 @@ static int clk_pwm_probe(struct platform_device *pdev) if (IS_ERR(pwm)) return PTR_ERR(pwm); - if (!pwm->period) { + pwm_get_args(pwm, ); + if (!pargs.period) { dev_err(>dev, "invalid PWM period\n"); return -EINVAL; } if (of_property_read_u32(node, "clock-frequency", _pwm->fixed_rate)) - clk_pwm->fixed_rate = NSEC_PER_SEC / pwm->period; + clk_pwm->fixed_rate = NSEC_PER_SEC / pargs.period; - if (pwm->period != NSEC_PER_SEC / clk_pwm->fixed_rate && - pwm->period != DIV_ROUND_UP(NSEC_PER_SEC, clk_pwm->fixed_rate)) { + if (pargs.period != NSEC_PER_SEC / clk_pwm->fixed_rate && + pargs.period != DIV_ROUND_UP(NSEC_PER_SEC, clk_pwm->fixed_rate)) { dev_err(>dev, "clock-frequency does not match PWM period\n"); return -EINVAL; } - ret = pwm_config(pwm, (pwm->period + 1) >> 1, pwm->period); + /* +* FIXME: pwm_apply_args() should be removed when switching to the +* atomic PWM API. +*/ + pwm_apply_args(pwm); + ret = pwm_config(pwm, (pargs.period + 1) >> 1, pargs.period); if (ret < 0) return ret; -- 2.5.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 10/10] UPSTREAM: hwmon: pwm-fan: Use pwm_get_args() where appropriate
From: Boris BrezillonThe PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon Acked-by: Kamil Debski Signed-off-by: Thierry Reding (cherry picked from commit 2289711c9d4d588954ff86a06685f1579bf6c446) Signed-off-by: California Sullivan --- drivers/hwmon/pwm-fan.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index 3e23003..f9af393 100644 --- a/drivers/hwmon/pwm-fan.c +++ b/drivers/hwmon/pwm-fan.c @@ -40,15 +40,18 @@ struct pwm_fan_ctx { static int __set_pwm(struct pwm_fan_ctx *ctx, unsigned long pwm) { + struct pwm_args pargs; unsigned long duty; int ret = 0; + pwm_get_args(ctx->pwm, ); + mutex_lock(>lock); if (ctx->pwm_value == pwm) goto exit_set_pwm_err; - duty = DIV_ROUND_UP(pwm * (ctx->pwm->period - 1), MAX_PWM); - ret = pwm_config(ctx->pwm, duty, ctx->pwm->period); + duty = DIV_ROUND_UP(pwm * (pargs.period - 1), MAX_PWM); + ret = pwm_config(ctx->pwm, duty, pargs.period); if (ret) goto exit_set_pwm_err; @@ -215,6 +218,7 @@ static int pwm_fan_probe(struct platform_device *pdev) { struct thermal_cooling_device *cdev; struct pwm_fan_ctx *ctx; + struct pwm_args pargs; struct device *hwmon; int duty_cycle; int ret; @@ -233,11 +237,19 @@ static int pwm_fan_probe(struct platform_device *pdev) platform_set_drvdata(pdev, ctx); + /* +* FIXME: pwm_apply_args() should be removed when switching to the +* atomic PWM API. +*/ + pwm_apply_args(ctx->pwm); + /* Set duty cycle to maximum allowed */ - duty_cycle = ctx->pwm->period - 1; + pwm_get_args(ctx->pwm, ); + + duty_cycle = pargs.period - 1; ctx->pwm_value = MAX_PWM; - ret = pwm_config(ctx->pwm, duty_cycle, ctx->pwm->period); + ret = pwm_config(ctx->pwm, duty_cycle, pargs.period); if (ret) { dev_err(>dev, "Failed to configure PWM\n"); return ret; @@ -303,14 +315,16 @@ static int pwm_fan_suspend(struct device *dev) static int pwm_fan_resume(struct device *dev) { struct pwm_fan_ctx *ctx = dev_get_drvdata(dev); + struct pwm_args pargs; unsigned long duty; int ret; if (ctx->pwm_value == 0) return 0; - duty = DIV_ROUND_UP(ctx->pwm_value * (ctx->pwm->period - 1), MAX_PWM); - ret = pwm_config(ctx->pwm, duty, ctx->pwm->period); + pwm_get_args(ctx->pwm, ); + duty = DIV_ROUND_UP(ctx->pwm_value * (pargs.period - 1), MAX_PWM); + ret = pwm_config(ctx->pwm, duty, pargs.period); if (ret) return ret; return pwm_enable(ctx->pwm); -- 2.5.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 09/10] UPSTREAM: pwm: Use pwm_get/set_xxx() helpers where appropriate
From: Boris BrezillonUse pwm_get/set_xxx() helpers instead of directly accessing the pwm->xxx field. Doing that will ease adaptation of the PWM framework to support atomic update. Signed-off-by: Boris Brezillon Signed-off-by: Thierry Reding CONFLICTS: This patch originally fixed up omap-dmtimer as well, which does not yet exist in the 4.4 kernel. (cherry picked from commit 4b58896f72176b781816a9e14dcea5f755b19b5c) Signed-off-by: California Sullivan --- drivers/pwm/pwm-crc.c | 2 +- drivers/pwm/pwm-lpc18xx-sct.c | 2 +- drivers/pwm/pwm-sun4i.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/pwm/pwm-crc.c b/drivers/pwm/pwm-crc.c index 7101c70..bd0ebd0 100644 --- a/drivers/pwm/pwm-crc.c +++ b/drivers/pwm/pwm-crc.c @@ -75,7 +75,7 @@ static int crc_pwm_config(struct pwm_chip *c, struct pwm_device *pwm, return -EINVAL; } - if (pwm->period != period_ns) { + if (pwm_get_period(pwm) != period_ns) { int clk_div; /* changing the clk divisor, need to disable fisrt */ diff --git a/drivers/pwm/pwm-lpc18xx-sct.c b/drivers/pwm/pwm-lpc18xx-sct.c index 9163085..52aba84 100644 --- a/drivers/pwm/pwm-lpc18xx-sct.c +++ b/drivers/pwm/pwm-lpc18xx-sct.c @@ -249,7 +249,7 @@ static int lpc18xx_pwm_enable(struct pwm_chip *chip, struct pwm_device *pwm) LPC18XX_PWM_EVSTATEMSK(lpc18xx_data->duty_event), LPC18XX_PWM_EVSTATEMSK_ALL); - if (pwm->polarity == PWM_POLARITY_NORMAL) { + if (pwm_get_polarity(pwm) == PWM_POLARITY_NORMAL) { set_event = lpc18xx_pwm->period_event; clear_event = lpc18xx_data->duty_event; res_action = LPC18XX_PWM_RES_SET; diff --git a/drivers/pwm/pwm-sun4i.c b/drivers/pwm/pwm-sun4i.c index 67af9f6..03a99a5 100644 --- a/drivers/pwm/pwm-sun4i.c +++ b/drivers/pwm/pwm-sun4i.c @@ -354,7 +354,8 @@ static int sun4i_pwm_probe(struct platform_device *pdev) val = sun4i_pwm_readl(pwm, PWM_CTRL_REG); for (i = 0; i < pwm->chip.npwm; i++) if (!(val & BIT_CH(PWM_ACT_STATE, i))) - pwm->chip.pwms[i].polarity = PWM_POLARITY_INVERSED; + pwm_set_polarity(>chip.pwms[i], +PWM_POLARITY_INVERSED); clk_disable_unprepare(pwm->clk); return 0; -- 2.5.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 05/10] UPSTREAM: backlight: pwm_bl: Use pwm_get_args() where appropriate
From: Boris BrezillonThe PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon Signed-off-by: Thierry Reding (cherry picked from commit 6cb9644db7364ff5d2980ccd365b8cb684145327) Signed-off-by: California Sullivan --- drivers/video/backlight/pwm_bl.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index a33a290..b2b366b 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -201,6 +201,7 @@ static int pwm_backlight_probe(struct platform_device *pdev) struct device_node *node = pdev->dev.of_node; struct pwm_bl_data *pb; int initial_blank = FB_BLANK_UNBLANK; + struct pwm_args pargs; int ret; if (!data) { @@ -307,12 +308,19 @@ static int pwm_backlight_probe(struct platform_device *pdev) dev_dbg(>dev, "got pwm for backlight\n"); /* +* FIXME: pwm_apply_args() should be removed when switching to +* the atomic PWM API. +*/ + pwm_apply_args(pb->pwm); + + /* * The DT case will set the pwm_period_ns field to 0 and store the * period, parsed from the DT, in the PWM device. For the non-DT case, * set the period from platform data if it has not already been set * via the PWM lookup table. */ - pb->period = pwm_get_period(pb->pwm); + pwm_get_args(pb->pwm, ); + pb->period = pargs.period; if (!pb->period && (data->pwm_period_ns > 0)) pb->period = data->pwm_period_ns; -- 2.5.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 04/10] UPSTREAM: backlight: pwm_bl: Remove useless call to pwm_set_period()
From: Boris BREZILLONThe PWM period will be set when calling pwm_config. Remove this useless call to pwm_set_period(), which might mess up the internal PWM state. Signed-off-by: Boris Brezillon Acked-by: Lee Jones Signed-off-by: Thierry Reding (cherry picked from commit 7f044b09b68d36811518c55f736a20648e8ed6e2) Signed-off-by: California Sullivan --- drivers/video/backlight/pwm_bl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index 64f9e1b..a33a290 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -313,10 +313,8 @@ static int pwm_backlight_probe(struct platform_device *pdev) * via the PWM lookup table. */ pb->period = pwm_get_period(pb->pwm); - if (!pb->period && (data->pwm_period_ns > 0)) { + if (!pb->period && (data->pwm_period_ns > 0)) pb->period = data->pwm_period_ns; - pwm_set_period(pb->pwm, data->pwm_period_ns); - } pb->lth_brightness = data->lth_brightness * (pb->period / pb->scale); -- 2.5.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 08/10] UPSTREAM: pwm: rcar: Make use of pwm_is_enabled()
From: Boris BREZILLONCommit 5c31252c4a86 ("pwm: Add the pwm_is_enabled() helper") introduced a new function to test whether a PWM device is enabled or not without manipulating PWM internal fields. Hiding this is necessary if we want to smoothly move to the atomic PWM config approach without impacting PWM drivers. Fix this driver to use pwm_is_enabled() instead of directly accessing the ->flags field. Signed-off-by: Boris Brezillon Signed-off-by: Thierry Reding (cherry picked from commit 3587c260906259632df07652743269627f408d85) Signed-off-by: California Sullivan --- drivers/pwm/pwm-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pwm/pwm-rcar.c b/drivers/pwm/pwm-rcar.c index 6e99a63..70899c9 100644 --- a/drivers/pwm/pwm-rcar.c +++ b/drivers/pwm/pwm-rcar.c @@ -157,7 +157,7 @@ static int rcar_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, return div; /* Let the core driver set pwm->period if disabled and duty_ns == 0 */ - if (!test_bit(PWMF_ENABLED, >flags) && !duty_ns) + if (!pwm_is_enabled(pwm) && !duty_ns) return 0; rcar_pwm_update(rp, RCAR_PWMCR_SYNC, RCAR_PWMCR_SYNC, RCAR_PWMCR); -- 2.5.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 03/10] UPSTREAM: backlight: pwm_bl: Free PWM requested by legacy API on error path
From: Vladimir ZapolskiyIf pwm is requested by legacy pwm_request() and if the following backlight_device_register() call fails, add pwm_free() clean-up. Signed-off-by: Vladimir Zapolskiy Signed-off-by: Lee Jones (cherry picked from commit 60d613d6aef4ae49988eeb3ad38af948c561db1e) Signed-off-by: California Sullivan --- drivers/video/backlight/pwm_bl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index a22c1ec..64f9e1b 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -328,6 +328,8 @@ static int pwm_backlight_probe(struct platform_device *pdev) if (IS_ERR(bl)) { dev_err(>dev, "failed to register backlight\n"); ret = PTR_ERR(bl); + if (pb->legacy) + pwm_free(pb->pwm); goto err_alloc; } -- 2.5.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH 01/10] UPSTREAM: backlight: pwm_bl: Avoid backlight flicker when probed from DT
From: Philipp ZabelIf the driver is probed from the device tree, and there is a phandle property set on it, and the enable GPIO is already configured as output, and the backlight is currently disabled, keep it disabled. If all these conditions are met, assume there will be some other driver that can enable the backlight at the appropriate time. Signed-off-by: Philipp Zabel Reviewed-by: Christian Gmeiner Tested-by: Heiko Stuebner Signed-off-by: Lee Jones (cherry picked from 3698d7e7d221a5c90d4b55e96d0c8f98a8b4d7df) Signed-off-by: California Sullivan --- drivers/video/backlight/pwm_bl.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index ae3c6b6..3daf9cc 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -199,6 +199,8 @@ static int pwm_backlight_probe(struct platform_device *pdev) struct backlight_properties props; struct backlight_device *bl; struct pwm_bl_data *pb; + phandle phandle = pdev->dev.of_node->phandle; + int initial_blank = FB_BLANK_UNBLANK; int ret; if (!data) { @@ -242,7 +244,7 @@ static int pwm_backlight_probe(struct platform_device *pdev) pb->enabled = false; pb->enable_gpio = devm_gpiod_get_optional(>dev, "enable", - GPIOD_OUT_HIGH); + GPIOD_ASIS); if (IS_ERR(pb->enable_gpio)) { ret = PTR_ERR(pb->enable_gpio); goto err_alloc; @@ -264,12 +266,30 @@ static int pwm_backlight_probe(struct platform_device *pdev) pb->enable_gpio = gpio_to_desc(data->enable_gpio); } + if (pb->enable_gpio) { + /* +* If the driver is probed from the device tree and there is a +* phandle link pointing to the backlight node, it is safe to +* assume that another driver will enable the backlight at the +* appropriate time. Therefore, if it is disabled, keep it so. +*/ + if (phandle && + gpiod_get_direction(pb->enable_gpio) == GPIOF_DIR_OUT && + gpiod_get_value(pb->enable_gpio) == 0) + initial_blank = FB_BLANK_POWERDOWN; + else + gpiod_direction_output(pb->enable_gpio, 1); + } + pb->power_supply = devm_regulator_get(>dev, "power"); if (IS_ERR(pb->power_supply)) { ret = PTR_ERR(pb->power_supply); goto err_alloc; } + if (phandle && !regulator_is_enabled(pb->power_supply)) + initial_blank = FB_BLANK_POWERDOWN; + pb->pwm = devm_pwm_get(>dev, NULL); if (IS_ERR(pb->pwm) && PTR_ERR(pb->pwm) != -EPROBE_DEFER && !pdev->dev.of_node) { @@ -320,6 +340,7 @@ static int pwm_backlight_probe(struct platform_device *pdev) } bl->props.brightness = data->dft_brightness; + bl->props.power = initial_blank; backlight_update_status(bl); platform_set_drvdata(pdev, bl); -- 2.5.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[linux-yocto] [PATCH] drivers/mfd/pca9685-pwm.c: Update to reflect changes in patches from upstream
There are some patches brought into to 4.4 from upstream that change the pwm structure and move period and duty_cycle into a state structure so fix these up. Additional address the removal of PWMF_ENABLED in favor checking the state via pwm_is_enabled(). Signed-off-by: Saul Wold--- drivers/mfd/pca9685-pwm.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mfd/pca9685-pwm.c b/drivers/mfd/pca9685-pwm.c index 0c05263..3a79c33 100644 --- a/drivers/mfd/pca9685-pwm.c +++ b/drivers/mfd/pca9685-pwm.c @@ -80,16 +80,16 @@ int pca9685_update_prescale(struct pca9685 *pca, unsigned period_ns, if (reconfigure_channels) { for (i = 0; i < pca->pwm_chip.npwm; i++) { pwm = >pwm_chip.pwms[i]; - pwm->period = period_ns; - if (pwm->duty_cycle > 0) { + pwm->state.period = period_ns; + if (pwm->state.duty_cycle > 0) { /* Scale the rise time to maintain duty cycle */ duty_scale = period_ns; duty_scale *= 100; do_div(duty_scale, pca->pwm_period); - new_duty_ns = duty_scale * pwm->duty_cycle; + new_duty_ns = duty_scale * pwm->state.duty_cycle; do_div(new_duty_ns, 100); /* Update the duty_cycle */ - pwm_config(pwm, (int)new_duty_ns, pwm->period); + pwm_config(pwm, (int)new_duty_ns, pwm->state.period); } } } @@ -159,7 +159,7 @@ static int pca9685_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, /* Changing PWM period for a single channel at run-time not allowed. * The PCA9685 PWM clock is shared across all PWM channels */ - if (unlikely(period_ns != pwm->period)) + if (unlikely(period_ns != pwm->state.period)) return -EPERM; if (unlikely(pwm->hwpwm >= PCA9685_MAXCHAN)) { @@ -180,7 +180,7 @@ static int pca9685_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm, else /* clear the LED_FULL bit */ regmap_write(pca->regmap, reg_on_h, 0x00); - full_off = !test_bit(PWMF_ENABLED, >flags) << 4; + full_off = !pwm_is_enabled(pwm); regmap_write(pca->regmap, reg_off_l, (int)duty & 0xff); @@ -246,7 +246,7 @@ static int pca9685_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm) (gpiochip_is_requested(gpio_chip, channel))) return -EBUSY; - pwm->period = pca->pwm_period; + pwm->state.period = pca->pwm_period; return 0; } -- 2.5.5 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
Re: [linux-yocto] dwc3 pm enabling backport for standard/intel/base
On Thu, Jul 21, 2016 at 01:12:25PM -0400, Bruce Ashfield wrote: > On 2016-07-20 06:34 PM, Ernst, Eric wrote: > >Please consider pull-request listed below. We tested on Grosse Tete and > >verify > >proper PM for USB after applying the set. This was rebased onto latest of > >bxt-rebase, but I think we should consider also for standard/intel/base. > > > > They looked clean enough to me, so I went for the standard/intel/base > option. > > These are now pushed to the repo, let me know if there are any build or > runtime issues. The merge was clean for all branches, so I don't expect > anything. > > Bruce I saw it when doing a fetch earlier this morning - thank you. > > >Let me know if you have questions/issues. > > > >-Eric > > > > > >The following changes since commit 256385e1e85055afb8432ecf0aeee65e2590d142: > > > > usb: typec: add PD sink port support for Intel Whiskey Cove PMIC USB > > Type-C PHY driver (2016-07-15 11:05:09 -0400) > > > >are available in the git repository at: > > > > https://github.com/egernst/linux-yocto-4.4.git bxt-dwc3-pm-backport > > > >for you to fetch changes up to f6d09c801315b8d90681eff8b90c19cb0e51: > > > > UPSTREAM: usb: Add USB 3.1 Precision time measurement capability > > descriptor support (2016-07-19 16:34:20 -0700) > > > > > >Dan Carpenter (1): > > UPSTREAM: usb: dwc3: gadget: fix mask and shift order in > > DWC3_DCFG_NUMP() > > > >Du, Changbin (1): > > UPSTREAM: usb: dwc3: make dwc3_debugfs_init return value be void > > > >Felipe Balbi (50): > > UPSTREAM: usb: dwc3: drop FIFO resizing logic > > UPSTREAM: usb: dwc3: gadget: always enable CSP > > UPSTREAM: usb: dwc3: gadget: purge dev_dbg() calls > > UPSTREAM: usb: dwc3: gadget: pass a condition to dev_WARN_ONCE() > > UPSTREAM: usb: dwc3: core: purge dev_dbg() calls > > UPSTREAM: usb: dwc3: core: improve reset sequence > > UPSTREAM: usb: dwc3: gadget: fix endpoint renaming > > UPSTREAM: usb: dwc3: core: fix PHY handling during suspend > > UPSTREAM: usb: dwc3: better name for our request management lists > > UPSTREAM: usb: dwc3: remove num_event_buffers > > UPSTREAM: usb: dwc3: drop ev_buffs array > > UPSTREAM: usb: dwc3: gadget: pass ev_buff as cookie to irq handler > > UPSTREAM: usb: dwc3: gadget: combine return points into a single one > > UPSTREAM: usb: dwc3: gadget: clear SUSPHY bit before ep cmds > > UPSTREAM: usb: dwc3: gadget: extract unlocked dwc3_gadget_wakeup() > > UPSTREAM: usb: dwc3: gadget: put link to U0 before Start Transfer > > UPSTREAM: usb: dwc3: gadget: rename busy/free_slot to > > trb_enqueue/dequeue > > UPSTREAM: usb: dwc3: increase maximum number of TRBs per endpoint > > UPSTREAM: usb: dwc3: core: document struct dwc3_request > > UPSTREAM: usb: dwc3: switch trb enqueue/dequeue and first_trb_index > > to u8 > > UPSTREAM: usb: dwc3: get rid of DWC3_TRB_MASK > > UPSTREAM: usb: dwc3: gadget: add trb enqueue/dequeue helpers > > UPSTREAM: usb: dwc3: gadget: move % operation to increment helpers > > UPSTREAM: usb: dwc3: gadget: use link TRB for all endpoint types > > UPSTREAM: usb: dwc3: gadget: remove newline from trace > > UPSTREAM: usb: dwc3: gadget: don't interrupt when chained > > UPSTREAM: usb: dwc3: core: add fifo space helper > > UPSTREAM: usb: dwc3: core: add helper to extract trb type > > UPSTREAM: usb: dwc3: gadget: update DCFG.NumP to max burst size > > UPSTREAM: usb: dwc3: gadget: disable automatic calculation of ACK TP > > NUMP > > FROMLIST: usb: dwc3: gadget: re-factor ->udc_start and ->udc_stop > > FROMLIST: usb: dwc3: gadget: fix gadget suspend/resume > > FROMLIST: usb: dwc3: core: get rid of DWC3_PM_OPS macro > > FROMLIST: usb: dwc3: gadget: prepare TRBs on update transfers too > > FROMLIST: usb: dwc3: gadget: simplify __dwc3_gadget_kick_transfer() > > FROMLIST: usb: dwc3: gadget: rely on sg_is_last() and list_is_last() > > FROMLIST: usb: dwc3: gadget: remove udelay(1) when sending ep cmds > > FROMLIST: usb: dwc3: gadget: return 0 if we try to Wakeup in > > superspeed > > FROMLIST: usb: dwc3: gadget: split __dwc3_gadget_kick_transfer() > > FROMLIST: usb: dwc3: gadget: initialize NUMP based on RxFIFO Size > > FROMLIST: usb: dwc3: gadget: pass dep as argument to endpoint command > > FROMLIST: usb: dwc3: gadget: add a pointer to endpoint registers > > FROMLIST: usb: dwc3: core: move fladj to dwc3 structure > > FROMLIST: usb: dwc3: core: re-factor init and exit paths > > FROMLIST: usb: dwc3: core: simplify suspend/resume operations > > FROMLIST: usb: dwc3: gadget: hold gadget IRQ in dwc->irq_gadget > > FROMLIST: usb: dwc3: gadget: only resume USB2 PHY in <=HIGHSPEED > > FROMLIST: usb: dwc3: gadget: fix for
Re: [linux-yocto] dwc3 pm enabling backport for standard/intel/base
On 2016-07-20 06:34 PM, Ernst, Eric wrote: Please consider pull-request listed below. We tested on Grosse Tete and verify proper PM for USB after applying the set. This was rebased onto latest of bxt-rebase, but I think we should consider also for standard/intel/base. They looked clean enough to me, so I went for the standard/intel/base option. These are now pushed to the repo, let me know if there are any build or runtime issues. The merge was clean for all branches, so I don't expect anything. Bruce Let me know if you have questions/issues. -Eric The following changes since commit 256385e1e85055afb8432ecf0aeee65e2590d142: usb: typec: add PD sink port support for Intel Whiskey Cove PMIC USB Type-C PHY driver (2016-07-15 11:05:09 -0400) are available in the git repository at: https://github.com/egernst/linux-yocto-4.4.git bxt-dwc3-pm-backport for you to fetch changes up to f6d09c801315b8d90681eff8b90c19cb0e51: UPSTREAM: usb: Add USB 3.1 Precision time measurement capability descriptor support (2016-07-19 16:34:20 -0700) Dan Carpenter (1): UPSTREAM: usb: dwc3: gadget: fix mask and shift order in DWC3_DCFG_NUMP() Du, Changbin (1): UPSTREAM: usb: dwc3: make dwc3_debugfs_init return value be void Felipe Balbi (50): UPSTREAM: usb: dwc3: drop FIFO resizing logic UPSTREAM: usb: dwc3: gadget: always enable CSP UPSTREAM: usb: dwc3: gadget: purge dev_dbg() calls UPSTREAM: usb: dwc3: gadget: pass a condition to dev_WARN_ONCE() UPSTREAM: usb: dwc3: core: purge dev_dbg() calls UPSTREAM: usb: dwc3: core: improve reset sequence UPSTREAM: usb: dwc3: gadget: fix endpoint renaming UPSTREAM: usb: dwc3: core: fix PHY handling during suspend UPSTREAM: usb: dwc3: better name for our request management lists UPSTREAM: usb: dwc3: remove num_event_buffers UPSTREAM: usb: dwc3: drop ev_buffs array UPSTREAM: usb: dwc3: gadget: pass ev_buff as cookie to irq handler UPSTREAM: usb: dwc3: gadget: combine return points into a single one UPSTREAM: usb: dwc3: gadget: clear SUSPHY bit before ep cmds UPSTREAM: usb: dwc3: gadget: extract unlocked dwc3_gadget_wakeup() UPSTREAM: usb: dwc3: gadget: put link to U0 before Start Transfer UPSTREAM: usb: dwc3: gadget: rename busy/free_slot to trb_enqueue/dequeue UPSTREAM: usb: dwc3: increase maximum number of TRBs per endpoint UPSTREAM: usb: dwc3: core: document struct dwc3_request UPSTREAM: usb: dwc3: switch trb enqueue/dequeue and first_trb_index to u8 UPSTREAM: usb: dwc3: get rid of DWC3_TRB_MASK UPSTREAM: usb: dwc3: gadget: add trb enqueue/dequeue helpers UPSTREAM: usb: dwc3: gadget: move % operation to increment helpers UPSTREAM: usb: dwc3: gadget: use link TRB for all endpoint types UPSTREAM: usb: dwc3: gadget: remove newline from trace UPSTREAM: usb: dwc3: gadget: don't interrupt when chained UPSTREAM: usb: dwc3: core: add fifo space helper UPSTREAM: usb: dwc3: core: add helper to extract trb type UPSTREAM: usb: dwc3: gadget: update DCFG.NumP to max burst size UPSTREAM: usb: dwc3: gadget: disable automatic calculation of ACK TP NUMP FROMLIST: usb: dwc3: gadget: re-factor ->udc_start and ->udc_stop FROMLIST: usb: dwc3: gadget: fix gadget suspend/resume FROMLIST: usb: dwc3: core: get rid of DWC3_PM_OPS macro FROMLIST: usb: dwc3: gadget: prepare TRBs on update transfers too FROMLIST: usb: dwc3: gadget: simplify __dwc3_gadget_kick_transfer() FROMLIST: usb: dwc3: gadget: rely on sg_is_last() and list_is_last() FROMLIST: usb: dwc3: gadget: remove udelay(1) when sending ep cmds FROMLIST: usb: dwc3: gadget: return 0 if we try to Wakeup in superspeed FROMLIST: usb: dwc3: gadget: split __dwc3_gadget_kick_transfer() FROMLIST: usb: dwc3: gadget: initialize NUMP based on RxFIFO Size FROMLIST: usb: dwc3: gadget: pass dep as argument to endpoint command FROMLIST: usb: dwc3: gadget: add a pointer to endpoint registers FROMLIST: usb: dwc3: core: move fladj to dwc3 structure FROMLIST: usb: dwc3: core: re-factor init and exit paths FROMLIST: usb: dwc3: core: simplify suspend/resume operations FROMLIST: usb: dwc3: gadget: hold gadget IRQ in dwc->irq_gadget FROMLIST: usb: dwc3: gadget: only resume USB2 PHY in <=HIGHSPEED FROMLIST: usb: dwc3: gadget: fix for possible endpoint disable race FROMLIST: usb: dwc3: implement runtime PM FROMLIST: usb: dwc3: pci: add Power Management dummy hooks Heikki Krogerus (2): UPSTREAM: usb: dwc3: pci: make build-in device properties available UPSTREAM: usb: dwc3: pci: pass the platform device as a parameter to dwc3_pci_quirks() Jiebing Li (1): UPSTREAM: usb: dwc3: gadget: release spin lock during
Re: [linux-yocto] [PATCH] features/powertop: To provide wakeup/seconds events
On 2016-07-21 03:26 AM, Saul Wold wrote: On Wed, 2016-07-20 at 16:20 -0700, Nilesh Bacchewar wrote: for powertop to provide wakeup/seconds events Signed-off-by: Nilesh Bacchewar--- features/powertop/powertop.cfg | 5 + features/soc/broxton/broxton.scc | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 features/powertop/powertop.cfg diff --git a/features/powertop/powertop.cfg b/features/powertop/powertop.cfg new file mode 100644 index 000..922a731 --- /dev/null +++ b/features/powertop/powertop.cfg @@ -0,0 +1,5 @@ +# make debugging options available +CONFIG_DEBUG_KERNEL=y + I thought that the Ostro team did not want DEBUG_KERNEL enabled, I realize that it might be required for TIMER_STATS, but I think you would want to enable this via the developer kernel, rather than the -standard kernel, this is why there is a split. TIMER_STATS is already part of the -developer kernel via the profiling.scc I think I would rather see the -developer kernel be used for validation, if that's what your trying to do, instead of polluting the -standard kernel with DEBUG items. Good point, since if we pull in these options via the individual features, we won't be able to properly reuse them in kernels that don't want debug options enabled. Unless of course the feature doesn't work without the option, and in that case, we'd be wise to just drop it from the standard kernel's included functions and add the debug option. Is that the case here ? Bruce Sau! +# Collect kernel timers statistics +CONFIG_TIMER_STATS=y diff --git a/features/soc/broxton/broxton.scc b/features/soc/broxton/broxton.scc index 8e268e5..aea7bbd 100644 --- a/features/soc/broxton/broxton.scc +++ b/features/soc/broxton/broxton.scc @@ -14,4 +14,6 @@ include features/usb/designware-usb3.scc include features/intel-pinctrl/intel-pinctrl.scc include features/usb/usb-typec.scc +include features/powertop/powertop.scc + kconf hardware broxton.cfg -- 1.9.1 -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
Re: [linux-yocto] [standard/base] mei: drop wr_msg from the mei_dev structure
On 2016-07-20 03:37 PM, Tomas Winkler wrote: From: Alexander Usyskincommit c0ff9019ee64101fda8f19338da799fda8217e14 upstream The control messages are usually small, around 8 bytes, and can be allocated on the stack. Using on stack allocation allows us to drop 'wr_msg' a rather large buffer reserved in the mei_dev structure and relax contention of this device global buffer. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- Also availabe for pull https://github.com/tomasbw/linux-yocto-4.4.git standard/base-mei Looks good. I've grabbed this and applied it to standard/* It will be in the next set of SRCREV updates. Bruce drivers/misc/mei/hbm.c | 137 ++--- drivers/misc/mei/mei_dev.h | 10 +--- 2 files changed, 68 insertions(+), 79 deletions(-) diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c index 5aa606c8a827..085f3aafe6fa 100644 --- a/drivers/misc/mei/hbm.c +++ b/drivers/misc/mei/hbm.c @@ -132,6 +132,7 @@ static inline void mei_hbm_hdr(struct mei_msg_hdr *hdr, size_t length) hdr->length = length; hdr->msg_complete = 1; hdr->reserved = 0; + hdr->internal = 0; } /** @@ -165,15 +166,15 @@ void mei_hbm_cl_hdr(struct mei_cl *cl, u8 hbm_cmd, void *buf, size_t len) * Return: 0 on success, <0 on failure. */ static inline -int mei_hbm_cl_write(struct mei_device *dev, -struct mei_cl *cl, u8 hbm_cmd, size_t len) +int mei_hbm_cl_write(struct mei_device *dev, struct mei_cl *cl, +u8 hbm_cmd, u8 *buf, size_t len) { - struct mei_msg_hdr *mei_hdr = >wr_msg.hdr; + struct mei_msg_hdr mei_hdr; - mei_hbm_hdr(mei_hdr, len); - mei_hbm_cl_hdr(cl, hbm_cmd, dev->wr_msg.data, len); + mei_hbm_hdr(_hdr, len); + mei_hbm_cl_hdr(cl, hbm_cmd, buf, len); - return mei_write_message(dev, mei_hdr, dev->wr_msg.data); + return mei_write_message(dev, _hdr, buf); } /** @@ -250,24 +251,23 @@ int mei_hbm_start_wait(struct mei_device *dev) */ int mei_hbm_start_req(struct mei_device *dev) { - struct mei_msg_hdr *mei_hdr = >wr_msg.hdr; - struct hbm_host_version_request *start_req; + struct mei_msg_hdr mei_hdr; + struct hbm_host_version_request start_req; const size_t len = sizeof(struct hbm_host_version_request); int ret; mei_hbm_reset(dev); - mei_hbm_hdr(mei_hdr, len); + mei_hbm_hdr(_hdr, len); /* host start message */ - start_req = (struct hbm_host_version_request *)dev->wr_msg.data; - memset(start_req, 0, len); - start_req->hbm_cmd = HOST_START_REQ_CMD; - start_req->host_version.major_version = HBM_MAJOR_VERSION; - start_req->host_version.minor_version = HBM_MINOR_VERSION; + memset(_req, 0, len); + start_req.hbm_cmd = HOST_START_REQ_CMD; + start_req.host_version.major_version = HBM_MAJOR_VERSION; + start_req.host_version.minor_version = HBM_MINOR_VERSION; dev->hbm_state = MEI_HBM_IDLE; - ret = mei_write_message(dev, mei_hdr, dev->wr_msg.data); + ret = mei_write_message(dev, _hdr, _req); if (ret) { dev_err(dev->dev, "version message write failed: ret = %d\n", ret); @@ -288,23 +288,22 @@ int mei_hbm_start_req(struct mei_device *dev) */ static int mei_hbm_enum_clients_req(struct mei_device *dev) { - struct mei_msg_hdr *mei_hdr = >wr_msg.hdr; - struct hbm_host_enum_request *enum_req; + struct mei_msg_hdr mei_hdr; + struct hbm_host_enum_request enum_req; const size_t len = sizeof(struct hbm_host_enum_request); int ret; /* enumerate clients */ - mei_hbm_hdr(mei_hdr, len); + mei_hbm_hdr(_hdr, len); - enum_req = (struct hbm_host_enum_request *)dev->wr_msg.data; - memset(enum_req, 0, len); - enum_req->hbm_cmd = HOST_ENUM_REQ_CMD; - enum_req->flags |= dev->hbm_f_dc_supported ? - MEI_HBM_ENUM_F_ALLOW_ADD : 0; - enum_req->flags |= dev->hbm_f_ie_supported ? - MEI_HBM_ENUM_F_IMMEDIATE_ENUM : 0; + memset(_req, 0, len); + enum_req.hbm_cmd = HOST_ENUM_REQ_CMD; + enum_req.flags |= dev->hbm_f_dc_supported ? + MEI_HBM_ENUM_F_ALLOW_ADD : 0; + enum_req.flags |= dev->hbm_f_ie_supported ? + MEI_HBM_ENUM_F_IMMEDIATE_ENUM : 0; - ret = mei_write_message(dev, mei_hdr, dev->wr_msg.data); + ret = mei_write_message(dev, _hdr, _req); if (ret) { dev_err(dev->dev, "enumeration request write failed: ret = %d.\n", ret); @@ -358,23 +357,21 @@ static int mei_hbm_me_cl_add(struct mei_device *dev, */ static int
Re: [linux-yocto] [PATCH] features/powertop: To provide wakeup/seconds events
On Wed, 2016-07-20 at 16:20 -0700, Nilesh Bacchewar wrote: > > for powertop to provide wakeup/seconds events > > Signed-off-by: Nilesh Bacchewar> --- > features/powertop/powertop.cfg | 5 + > features/soc/broxton/broxton.scc | 2 ++ > 2 files changed, 7 insertions(+) > create mode 100644 features/powertop/powertop.cfg > > diff --git a/features/powertop/powertop.cfg > b/features/powertop/powertop.cfg > new file mode 100644 > index 000..922a731 > --- /dev/null > +++ b/features/powertop/powertop.cfg > @@ -0,0 +1,5 @@ > +# make debugging options available > +CONFIG_DEBUG_KERNEL=y > + I thought that the Ostro team did not want DEBUG_KERNEL enabled, I realize that it might be required for TIMER_STATS, but I think you would want to enable this via the developer kernel, rather than the -standard kernel, this is why there is a split. TIMER_STATS is already part of the -developer kernel via the profiling.scc I think I would rather see the -developer kernel be used for validation, if that's what your trying to do, instead of polluting the -standard kernel with DEBUG items. Sau! > > +# Collect kernel timers statistics > +CONFIG_TIMER_STATS=y > diff --git a/features/soc/broxton/broxton.scc > b/features/soc/broxton/broxton.scc > index 8e268e5..aea7bbd 100644 > --- a/features/soc/broxton/broxton.scc > +++ b/features/soc/broxton/broxton.scc > @@ -14,4 +14,6 @@ include features/usb/designware-usb3.scc > include features/intel-pinctrl/intel-pinctrl.scc > include features/usb/usb-typec.scc > > +include features/powertop/powertop.scc > + > kconf hardware broxton.cfg > -- > 1.9.1 > -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto