- 26 9月, 2019 3 次提交
-
-
由 Uwe Kleine-König 提交于
This instance collects patches and Thierry updates the patches' status there, so I consider it used and suitable to document it officially. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Uwe Kleine-König 提交于
This is just a small subset of the relevant functions, but should at least catch all new code as every consumer has to call pwm_apply_state() (or the legacy function pwm_config()) and every PWM provider has to implement pwm_ops. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Sam Shih 提交于
This adds pwm support for MT7629, and separate mt7629 compatible string from mt7622 Signed-off-by: NSam Shih <sam.shih@mediatek.com> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
- 25 9月, 2019 5 次提交
-
-
由 Ryder Lee 提交于
This updates bindings for MT7629 PWM controller. Signed-off-by: NRyder Lee <ryder.lee@mediatek.com> Signed-off-by: NSam Shih <sam.shih@mediatek.com> Reviewed-by: NRob Herring <robh@kernel.org> Reviewed-by: NMatthias Brugger <matthias.bgg@gmail.com> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Sam Shih 提交于
Add SPDX identifiers to pwm-mediatek.c. Update MODULE_LICENSE to correctly reflect the GNU General Public License v2.0. Signed-off-by: NRyder Lee <ryder.lee@mediatek.com> Signed-off-by: NSam Shih <sam.shih@mediatek.com> Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Sam Shih 提交于
Use pwm_mediatek as common prefix to match the filename. No functional change intended. Signed-off-by: NRyder Lee <ryder.lee@mediatek.com> Signed-off-by: NSam Shih <sam.shih@mediatek.com> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Sam Shih 提交于
Instead of using fixed size of arrays, allocate the memory for them based on the number of PWMs specified for each SoC generation. Signed-off-by: NRyder Lee <ryder.lee@mediatek.com> Signed-off-by: NSam Shih <sam.shih@mediatek.com> Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Sam Shih 提交于
We can use fixed clocks to repair mt7628 PWM during configure from userspace. The SoC is legacy MIPS and has no complex clock tree. Because we can get the clock frequency for period calculation from fixed clocks specified in DT, we can remove the has_clock field, and directly use devm_clk_get() and clk_get_rate(). Signed-off-by: NRyder Lee <ryder.lee@mediatek.com> Signed-off-by: NSam Shih <sam.shih@mediatek.com> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
- 21 9月, 2019 25 次提交
-
-
由 Sam Shih 提交于
This patch drop the check for of_device_get_match_data. Due to the only way call driver probe is compatible match. The data pointer which points to the SoC specify data is directly set by driver, and it should not be NULL in our case. We can safety remove the check for the result of of_device_get_match_data(). Signed-off-by: NRyder Lee <ryder.lee@mediatek.com> Signed-off-by: NSam Shih <sam.shih@mediatek.com> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Thierry Reding 提交于
This helps readability by separating the driver-specific bits from the PWM framework bits. Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Thierry Reding 提交于
Since the driver is now exclusively DT, it only binds if it finds a match in the of_device_id table. But in that case the associated data can never be NULL, so drop the unnecessary check. While at it, drop the extra local variable and store the pointer to this per-SoC data in the driver data directly. Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Kamel Bouhara 提交于
Since commit 26202873 ("avr32: remove support for AVR32 architecture") there is no more user of platform_device_id and we should only use dt bindings Signed-off-by: NKamel Bouhara <kamel.bouhara@bootlin.com> Acked-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: NClaudiu Beznea <claudiu.beznea@microchip.com> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Fabrice Gasnier 提交于
LPTimer can use a 32KHz clock for counting. It depends on clock tree configuration. In such a case, PWM output frequency range is limited. Although unlikely, nothing prevents user from requesting a PWM frequency above counting clock (32KHz for instance): - This causes (prd - 1) = 0xffff to be written in ARR register later in the apply() routine. This results in badly configured PWM period (and also duty_cycle). Add a check to report an error is such a case. Signed-off-by: NFabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Uwe Kleine-König 提交于
It is surprising for a PWM consumer when the variable holding the requested state is modified by pwm_apply_state(). Consider for example a driver doing: #define PERIOD 5000000 #define DUTY_LITTLE 10 ... struct pwm_state state = { .period = PERIOD, .duty_cycle = DUTY_LITTLE, .polarity = PWM_POLARITY_NORMAL, .enabled = true, }; pwm_apply_state(mypwm, &state); ... state.duty_cycle = PERIOD / 2; pwm_apply_state(mypwm, &state); For sure the second call to pwm_apply_state() should still have state.period = PERIOD and not something the hardware driver chose for a reason that doesn't necessarily apply to the second call. So declare the state argument as a pointer to a const type and adapt all drivers' .apply callbacks. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Uwe Kleine-König 提交于
The pwm-fsl-ftm driver is one of only three PWM drivers which updates the state for the caller of pwm_apply_state(). This might have surprising results if the caller reuses the values expecting them to still represent the same state. Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Uwe Kleine-König 提交于
The pwm-sun4i driver is one of only three PWM drivers which updates the state for the caller of pwm_apply_state(). This might have surprising results if the caller reuses the values expecting them to still represent the same state. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Uwe Kleine-König 提交于
The pwm-rockchip driver is one of only three PWM drivers which updates the state for the caller of pwm_apply_state(). This might have surprising results if the caller reuses the values expecting them to still represent the same state. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Uwe Kleine-König 提交于
When pwm_apply_state() is called the lowlevel driver usually has to apply some rounding because the hardware doesn't support nanosecond resolution. So let pwm_get_state() return the actually implemented state instead of the last applied one if possible. Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Uwe Kleine-König 提交于
pwm->chip is dereferenced several times in the pwm_apply_state() function. Introducing a local variable for it helps keeping some lines a bit shorter. Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Uwe Kleine-König 提交于
Don't rely on *state being zero initialized and PWM_POLARITY_NORMAL being zero. So always assign .polarity. Signed-off-by: NUwe Kleine-König <uwe@kleine-koenig.org> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Stefan Wahren 提交于
This suppresses error messages in case the PWM clock isn't ready yet. Signed-off-by: NStefan Wahren <wahrenst@gmx.net> Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Stefan Wahren 提交于
The range check for period_ns was written under assumption of a fixed PWM clock. With clk-bcm2835 driver the PWM clock is a dynamic one. So fix this by doing the range check on the period register value. Signed-off-by: NStefan Wahren <wahrenst@gmx.net> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Stefan Wahren 提交于
The PWM config can be triggered via sysfs, so we better suppress the error message in case of an invalid period to avoid kernel log spamming. Signed-off-by: NStefan Wahren <wahrenst@gmx.net> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Yoshihiro Shimoda 提交于
Since the rcar_pwm_apply() has already checked whether state->enabled is set or not, this patch removes a redundant condition. Signed-off-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: NSimon Horman <horms+renesas@verge.net.au> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Baolin Wang 提交于
This patch adds the Spreadtrum PWM support, which provides maximum 4 channels. Signed-off-by: NNeo Hou <neo.hou@unisoc.com> Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Baolin Wang 提交于
Add Spreadtrum PWM controller documentation. Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Fabien Parent 提交于
Add the compatible and the platform data to support PWM on the MT8516 SoC. Signed-off-by: NFabien Parent <fparent@baylibre.com> Reviewed-by: NMatthias Brugger <matthias.bgg@gmail.com> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Fabien Parent 提交于
Add the device-tree documentation for the PWM IP on the MediaTek MT8516 SoCs. Signed-off-by: NFabien Parent <fparent@baylibre.com> Reviewed-by: NRob Herring <robh@kernel.org> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Stephen Boyd 提交于
We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch. // <smpl> @@ expression ret; struct platform_device *E; @@ ret = ( platform_get_irq(E, ...) | platform_get_irq_byname(E, ...) ); if ( \( ret < 0 \| ret <= 0 \) ) { ( -if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... } | ... -dev_err(...); ) ... } // </smpl> While we're here, remove braces on if statements that only have one statement (manually). Cc: Thierry Reding <thierry.reding@gmail.com> Cc: linux-pwm@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NStephen Boyd <swboyd@chromium.org> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Uwe Kleine-König 提交于
Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Uwe Kleine-König 提交于
The JZ4740 PWM implementation doesn't fulfill the (up to now insufficiently documented) requirements of the PWM API. At least document them in the driver. Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: NPaul Cercueil <paul@crapouillou.net> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Ding Xiang 提交于
devm_ioremap_resource() already outputs an error message, so remove the extra error message on failure. Signed-off-by: NDing Xiang <dingxiang@cmss.chinamobile.com> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
由 Anson Huang 提交于
Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together, to simplify the code. Signed-off-by: NAnson Huang <Anson.Huang@nxp.com> Reviewed-by: NDong Aisheng <aisheng.dong@nxp.com> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
- 08 8月, 2019 1 次提交
-
-
由 Hans de Goede 提交于
Commit 4a6ef8e3 ("pwm: Add support referencing PWMs from ACPI") made pwm_get unconditionally return the acpi_pwm_get return value if the device passed to pwm_get has an ACPI fwnode. But even if the passed in device has an ACPI fwnode, it does not necessarily have the necessary ACPI package defining its pwm bindings, especially since the binding / API of this ACPI package has only been introduced very recently. Up until now X86/ACPI devices which use a separate pwm controller for controlling their LCD screen's backlight brightness have been relying on the static lookup-list to get their pwm. pwm_get unconditionally returning the acpi_pwm_get return value breaks this, breaking backlight control on these devices. This commit fixes this by making pwm_get fall back to the static lookup-list if acpi_pwm_get returns -ENOENT. BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=96571 Reported-by: youling257@gmail.com Fixes: 4a6ef8e3 ("pwm: Add support referencing PWMs from ACPI") Cc: Nikolaus Voss <nikolaus.voss@loewensteinmedical.de> Signed-off-by: NHans de Goede <hdegoede@redhat.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: NNikolaus Voss <nikolaus.voss@loewensteinmedical.de> Signed-off-by: NThierry Reding <thierry.reding@gmail.com>
-
- 22 7月, 2019 6 次提交
-
-
由 Linus Torvalds 提交于
-
git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux由 Linus Torvalds 提交于
Pull Devicetree fixes from Rob Herring: "Fix several warnings/errors in validation of binding schemas" * tag 'devicetree-fixes-for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: dt-bindings: pinctrl: stm32: Fix missing 'clocks' property in examples dt-bindings: iio: ad7124: Fix dtc warnings in example dt-bindings: iio: avia-hx711: Fix avdd-supply typo in example dt-bindings: pinctrl: aspeed: Fix AST2500 example errors dt-bindings: pinctrl: aspeed: Fix 'compatible' schema errors dt-bindings: riscv: Limit cpus schema to only check RiscV 'cpu' nodes dt-bindings: Ensure child nodes are of type 'object'
-
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs由 Linus Torvalds 提交于
Pull vfs documentation typo fix from Al Viro. * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: typo fix: it's d_make_root, not d_make_inode...
-
git://git.samba.org/sfrench/cifs-2.6由 Linus Torvalds 提交于
Pull cifs fixes from Steve French: "Two fixes for stable, one that had dependency on earlier patch in this merge window and can now go in, and a perf improvement in SMB3 open" * tag '5.3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: update internal module number cifs: flush before set-info if we have writeable handles smb3: optimize open to not send query file internal info cifs: copy_file_range needs to strip setuid bits and update timestamps CIFS: fix deadlock in cached root handling
-
由 Qian Cai 提交于
The commit b3aa14f0 ("iommu: remove the mapping_error dma_map_ops method") incorrectly changed the checking from dma_ops_alloc_iova() in map_sg() causes a crash under memory pressure as dma_ops_alloc_iova() never return DMA_MAPPING_ERROR on failure but 0, so the error handling is all wrong. kernel BUG at drivers/iommu/iova.c:801! Workqueue: kblockd blk_mq_run_work_fn RIP: 0010:iova_magazine_free_pfns+0x7d/0xc0 Call Trace: free_cpu_cached_iovas+0xbd/0x150 alloc_iova_fast+0x8c/0xba dma_ops_alloc_iova.isra.6+0x65/0xa0 map_sg+0x8c/0x2a0 scsi_dma_map+0xc6/0x160 pqi_aio_submit_io+0x1f6/0x440 [smartpqi] pqi_scsi_queue_command+0x90c/0xdd0 [smartpqi] scsi_queue_rq+0x79c/0x1200 blk_mq_dispatch_rq_list+0x4dc/0xb70 blk_mq_sched_dispatch_requests+0x249/0x310 __blk_mq_run_hw_queue+0x128/0x200 blk_mq_run_work_fn+0x27/0x30 process_one_work+0x522/0xa10 worker_thread+0x63/0x5b0 kthread+0x1d2/0x1f0 ret_from_fork+0x22/0x40 Fixes: b3aa14f0 ("iommu: remove the mapping_error dma_map_ops method") Signed-off-by: NQian Cai <cai@lca.pw> Reviewed-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-
由 Mike Rapoport 提交于
The hexagon implementation pte_alloc_one(), pte_alloc_one_kernel(), pte_free_kernel() and pte_free() is identical to the generic except of lack of __GFP_ACCOUNT for the user PTEs allocation. Switch hexagon to use generic version of these functions. Signed-off-by: NMike Rapoport <rppt@linux.ibm.com> Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
-