Re: [PATCH 2/2] memory: omap-gpmc: Add Kconfig option for debug
Hi, On Tue, Jan 05, 2016 at 02:49:29PM -0800, Tony Lindgren wrote: > Commit 63aa945b1013 ("memory: omap-gpmc: Add Kconfig option for debug") > unified the GPMC debug for the SoCs with GPMC. The commit also left > out the option for HWMOD_INIT_NO_RESET as we now require proper timings > for GPMC to be able to remap GPMC devices out of address 0. > > Unfortunately on 900, onenand now only partially works with the device You may want to change 900 to n900 (maybe even Nokia N900) before actually committing this. > tree provided timings. It works enough to get detected but the clock > rate supported by the onenand chip gets misdetected. This in turn causes > the GPMC timings to be miscalculated and this leads into file system > corruption on n900. > > Looks like onenand needs CS_CONFIG1 bit 27 WRITETYPE set for for sync > write. This is needed also for async timings when we write to onenand > with omap2_onenand_set_async_mode(). Without sync write bit set, the > async read for the onenand ONENAND_REG_VERSION_ID will return 0xfff. > > Let's exit with an error if onenand rate is not detected. And let's > remove the extra call to omap2_onenand_set_async_mode() as we only > need to do this once at the end of omap2_onenand_setup_async(). > > Reported-by: Ivaylo Dimitrov> Signed-off-by: Tony Lindgren -- Sebastian signature.asc Description: PGP signature
Re: [PATCH v2 5/8] drivers:input:ads7846(+tsc2046): add new common binding names, pre-calibration and flipping
Hi, On Fri, Nov 13, 2015 at 09:35:56PM +0100, H. Nikolaus Schaller wrote: > commit b98abe52fa8e ("Input: add common DT binding for touchscreens") > introduced common DT bindings for touchscreens [1] and a helper function to > parse the DT. > > This has been integrated and interpretation of the inversion (flipping) > properties for the x and y axis has been added to accommodate any > orientation of the touch in relation to the LCD. > > By scaling the min/max ADC values to the screen size it is now possible to > pre-calibrate the touch so that is (almost) exactly matches the LCD it is > glued onto. This allows to well enough operate the touch before a user > space calibration can improve the precision. > > [1]: Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt > > Signed-off-by: H. Nikolaus Schaller> --- > .../devicetree/bindings/input/ads7846.txt | 8 ++- > drivers/input/touchscreen/ads7846.c| 72 > -- > 2 files changed, 74 insertions(+), 6 deletions(-) > > diff --git a/Documentation/devicetree/bindings/input/ads7846.txt > b/Documentation/devicetree/bindings/input/ads7846.txt > index df8b127..ae56355 100644 > --- a/Documentation/devicetree/bindings/input/ads7846.txt > +++ b/Documentation/devicetree/bindings/input/ads7846.txt > @@ -26,12 +26,17 @@ Additional required properties: > > Optional properties: > > +You can optionally specify any of the touchscreen parameters described in > + > + Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt > + > +This allows to scale, invert or swap coordinates and define the fuzz factors. > + > ti,vref-delay-usecs vref supply delay in usecs, 0 for > external vref (u16). > ti,vref-mv The VREF voltage, in millivolts (u16). > ti,keep-vref-on set to keep vref on for differential > measurements as well > - ti,swap-xy swap x and y axis I guess this should be: ti,swap-xy: deprecated name for touchscreen-swapped-x-y -- Sebastian signature.asc Description: PGP signature
Re: [PATCH] Revert "ARM: dts: twl4030: Add iio properties for bci subnode"
Hi, On Sat, Nov 07, 2015 at 09:19:25AM +1100, Stephen Rothwell wrote: > On Fri, 6 Nov 2015 10:36:34 -0800 Kevin Hilman <khil...@kernel.org> wrote: > > On Fri, Nov 6, 2015 at 8:13 AM, Sebastian Reichel <s...@kernel.org> wrote: > > > This reverts commit af19161aaed7ff8d1a52b2e517460f2fa0774e32, > > > which breaks the omap3 device tree build due to a wrong reference. > > > > > > I accidently queued this change via the power supply subsystem while > > > telling Marek at the same time, that it should go through Tony's tree. > > > Following that I did miss Stephen's messages about the build failure in > > > linux-next and since he switched to merging an older snapshot nobody > > > else noticed the problem in my tree. I didn't notice myself, since I > > > did not build any device tree files assuming none have changed by me. > > > > > > Signed-off-by: Sebastian Reichel <s...@kernel.org> > > > > We also found this in kernelci.org build testing, and verified that > > this fixes the build. > > > > Tested-by: Kevin Hilman <khil...@linaro.org> > > > > Thanks Felipe for reporting, and thanks Sebastian for the quick fix. > > I think "quick fix" is a bit rich. I reported this to Sebastian on > Sept 29, Oct 2 , Oct 8, Oct 16, and Oct 21. Yes, I did see them after searching for them. My filter rules put your mails together with the LKML mails (which I usually skip over quite fast), so I did not notice the first one. Since the follow up mails were in the same thread as the one(s) previously marked as dont-care, I didn't notice them either. > The only response I got was from Marek Belisko on Oct 8 and 21. I > have been using the battery tree > (git://git.infradead.org/battery-2.6.git#master) > from Sept 25, so none of the commits after that have been in any linux-next > release. > > Yes, I am a little annoyed. Sorry :( > Do people have trouble receiving my emails? I did create two extra rules for your mails directly after preparing the revert, so I hope it won't happen again. On Sat, Fri, 6 Nov 2015 14:36:25 -0800, Kevin Hilman wrote: > I don't think the problem was not getting your emails, looks like the > problem was a major disconnect between what was sent to Linus and what > was in -next. :( Is there an easy way to check this, so that I can create a cronjob checkin it? Having an additional automatic "your tree differs from linux-next" would be helpful, since that would make me search for the problem/a mail from Stephen. -- Sebastian signature.asc Description: PGP signature
Re: Linus HEAD build break
Hi, On Fri, Nov 06, 2015 at 06:53:52AM -0800, Tony Lindgren wrote: > * Felipe Balbi[151106 06:41]: > > Belisko Marek writes: > > > On Fri, Nov 6, 2015 at 3:24 PM, Felipe Balbi wrote: > > >> Felipe Balbi writes: > > >>> your commit af19161aaed7 ("ARM: dts: twl4030: Add iio properties for bci > > >>> subnode") breaks build on current linus/master (which current sits in > > >> > > >> this commit cannot be found in next. How come it's in linus/master ? > > > I did post fix but Tony seems doesn't merge it: > > > https://lkml.org/lkml/2015/10/13/816 > > > > looking at that thread, I have no idea how come the old version was > > merged in the first place. Tony was clear that it broke build and yet > > this patch has made its way to mainline and it didn't even go through > > linux-next, which makes the problem worse. > > > > Now we have a bisection point where the tree (well, some DTS files) > > won't even build. This is quite messy. > > Yes didn't I drop the patch and pointed out it breaks the build? > > Guys, please stop doing this. Do not merge driver code that has > not been sitting in linux next at least a week. And for the dts > changes, please make sure you have proper acks. > > And now we have yet another merge window where things unexpectedly > break during the merge window because of untested driver changes. > > Please repost the fix and I'll ack it and you guys send a new pull > request to fix it ASAP explaining how it happened. mh for some reason I accidently added it to my next branch. I'm not sure why, since I did not intend to queue it at all. Sorry for the mess. I wonder why it has not been in next, though. Checking my next tree, it should have been there since end of September. -- Sebastian signature.asc Description: PGP signature
Re: Linus HEAD build break
Hi, On Fri, Nov 06, 2015 at 04:34:12PM +0100, Sebastian Reichel wrote: > On Fri, Nov 06, 2015 at 06:53:52AM -0800, Tony Lindgren wrote: > > * Felipe Balbi <ba...@ti.com> [151106 06:41]: > > > Belisko Marek <marek.beli...@gmail.com> writes: > > > > On Fri, Nov 6, 2015 at 3:24 PM, Felipe Balbi <ba...@ti.com> wrote: > > > >> Felipe Balbi <ba...@ti.com> writes: > > > >>> your commit af19161aaed7 ("ARM: dts: twl4030: Add iio properties for > > > >>> bci > > > >>> subnode") breaks build on current linus/master (which current sits in > > > >> > > > >> this commit cannot be found in next. How come it's in linus/master ? > > > > I did post fix but Tony seems doesn't merge it: > > > > https://lkml.org/lkml/2015/10/13/816 > > > > > > looking at that thread, I have no idea how come the old version was > > > merged in the first place. Tony was clear that it broke build and yet > > > this patch has made its way to mainline and it didn't even go through > > > linux-next, which makes the problem worse. > > > > > > Now we have a bisection point where the tree (well, some DTS files) > > > won't even build. This is quite messy. > > > > Yes didn't I drop the patch and pointed out it breaks the build? > > > > Guys, please stop doing this. Do not merge driver code that has > > not been sitting in linux next at least a week. And for the dts > > changes, please make sure you have proper acks. > > > > And now we have yet another merge window where things unexpectedly > > break during the merge window because of untested driver changes. > > > > Please repost the fix and I'll ack it and you guys send a new pull > > request to fix it ASAP explaining how it happened. > > mh for some reason I accidently added it to my next branch. I'm not > sure why, since I did not intend to queue it at all. Sorry for the > mess. > > I wonder why it has not been in next, though. Checking my next tree, > it should have been there since end of September. I missed Stephen's messages about the build failure [0] and he switched to using a checkout from 20150925, which is directly before the patch. As a result this patch and all following patches have not been tested in linux-next :( I will send a revert to you guys in a few minutes, so that I can get your ACK for sending it as pull request to Torvalds. [0] https://lkml.org/lkml/2015/9/28/844 -- Sebastian signature.asc Description: PGP signature
[PATCH] Revert "ARM: dts: twl4030: Add iio properties for bci subnode"
This reverts commit af19161aaed7ff8d1a52b2e517460f2fa0774e32, which breaks the omap3 device tree build due to a wrong reference. I accidently queued this change via the power supply subsystem while telling Marek at the same time, that it should go through Tony's tree. Following that I did miss Stephen's messages about the build failure in linux-next and since he switched to merging an older snapshot nobody else noticed the problem in my tree. I didn't notice myself, since I did not build any device tree files assuming none have changed by me. Signed-off-by: Sebastian Reichel <s...@kernel.org> --- arch/arm/boot/dts/twl4030.dtsi | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/arm/boot/dts/twl4030.dtsi b/arch/arm/boot/dts/twl4030.dtsi index 482b7aa37808..36ae9160b558 100644 --- a/arch/arm/boot/dts/twl4030.dtsi +++ b/arch/arm/boot/dts/twl4030.dtsi @@ -22,8 +22,6 @@ charger: bci { compatible = "ti,twl4030-bci"; interrupts = <9>, <2>; - io-channels = <_madc 11>; - io-channel-name = "vac"; bci3v1-supply = <>; }; -- 2.6.2 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL] power supply fix for 4.4
Hi Linus, The following changes since commit 3e069adabc9487b5e28065a17e6a228da3412dfd: Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input (2015-11-06 11:57:41 -0800) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git tags/for-v4.4-important-fix for you to fetch changes up to 829a7da03fd5f94c3a3ee1f8e22371e81cf73c79: Revert "ARM: dts: twl4030: Add iio properties for bci subnode" (2015-11-06 21:17:53 +0100) power supply fixes for the v4.4 series Just a single revert for a patch, that I should not have queued. More detailed description is inside the patch. It's totally my fault, that this happened, sorry about that :( ---- Sebastian Reichel (1): Revert "ARM: dts: twl4030: Add iio properties for bci subnode" arch/arm/boot/dts/twl4030.dtsi | 2 -- 1 file changed, 2 deletions(-) -- Sebastian signature.asc Description: PGP signature
Re: [PATCH] regulator: tps65217: remove tps65217.dtsi file
Hi, On Mon, Oct 26, 2015 at 10:13:55AM +0100, Heiko Schocher wrote: > remove tps65217.dtsi and adapt all boards, which > used it. > > Signed-off-by: Heiko Schocher> --- > Suggested by Mark Brown, see: > https://lkml.org/lkml/2015/10/21/581 > > .../devicetree/bindings/regulator/tps65217.txt | 78 > -- why did you delete the binding description? -- Sebastian signature.asc Description: PGP signature
bug in omap3_rom_rng_idle()
Hi, During N900 boot I get the trace found below. The problem can be seen in omap3_rom_rng_idle(), which is called by a kernel timer (=softirq). In that function you call clk_disable_unprepare(), which must not be called from atomic context, since clk_unprepare() may sleep. [1.885131] [ cut here ] [1.890075] WARNING: CPU: 0 PID: 6 at kernel/locking/mutex.c:868 mutex_trylock+0x1fc/0x21c() [1.899169] DEBUG_LOCKS_WARN_ON(in_interrupt()) [1.903808] Modules linked in: [1.907287] CPU: 0 PID: 6 Comm: kworker/u2:0 Tainted: GW 4.3.0-rc6-00012-g689422d8e6d2-dirty #630 [1.917999] Hardware name: Nokia RX-51 board [1.922576] Workqueue: deferwq deferred_probe_work_func [1.928192] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [1.936462] [] (show_stack) from [] (dump_stack+0x84/0x9c) [1.944183] [] (dump_stack) from [] (warn_slowpath_common+0x78/0xb4) [1.952758] [] (warn_slowpath_common) from [] (warn_slowpath_fmt+0x30/0x40) [1.962036] [] (warn_slowpath_fmt) from [] (mutex_trylock+0x1fc/0x21c) [1.970855] [] (mutex_trylock) from [] (clk_prepare_lock+0xc/0xec) [1.979309] [] (clk_prepare_lock) from [] (clk_unprepare+0x1c/0x2c) [1.987854] [] (clk_unprepare) from [] (omap3_rom_rng_idle+0x38/0x5c) [1.996582] [] (omap3_rom_rng_idle) from [] (call_timer_fn+0x8c/0x194) [2.005371] [] (call_timer_fn) from [] (run_timer_softirq+0x1d8/0x2c8) [2.014190] [] (run_timer_softirq) from [] (__do_softirq+0xcc/0x34c) [2.022766] [] (__do_softirq) from [] (irq_exit+0xbc/0x130) [2.030578] [] (irq_exit) from [] (__handle_domain_irq+0x6c/0xe0) [2.038940] [] (__handle_domain_irq) from [] (__irq_svc+0x58/0x78) [2.047363] [] (__irq_svc) from [] (_raw_spin_unlock_irqrestore+0x34/0x44) [2.056549] [] (_raw_spin_unlock_irqrestore) from [] (onenand_release_device+0x48/0x54) [2.066925] [] (onenand_release_device) from [] (onenand_bbt_read_oob+0x17c/0x1dc) [2.076843] [] (onenand_bbt_read_oob) from [] (onenand_scan_bbt+0x104/0x24c) [2.086212] [] (onenand_scan_bbt) from [] (onenand_scan+0x4f4/0xe40) [2.094818] [] (onenand_scan) from [] (omap2_onenand_probe+0x250/0x49c) [2.103729] [] (omap2_onenand_probe) from [] (platform_drv_probe+0x44/0xac) [2.112945] [] (platform_drv_probe) from [] (driver_probe_device+0x1f4/0x2f0) [2.122406] [] (driver_probe_device) from [] (bus_for_each_drv+0x64/0x98) [2.131500] [] (bus_for_each_drv) from [] (__device_attach+0xb0/0x118) [2.140289] [] (__device_attach) from [] (bus_probe_device+0x88/0x90) [2.149017] [] (bus_probe_device) from [] (device_add+0x348/0x568) [2.157470] [] (device_add) from [] (platform_device_add+0xf8/0x214) [2.166076] [] (platform_device_add) from [] (gpmc_onenand_init+0x80/0x10c) [2.175384] [] (gpmc_onenand_init) from [] (gpmc_probe+0x3ac/0x7e8) [2.183898] [] (gpmc_probe) from [] (platform_drv_probe+0x44/0xac) [2.192291] [] (platform_drv_probe) from [] (driver_probe_device+0x1f4/0x2f0) [2.201751] [] (driver_probe_device) from [] (bus_for_each_drv+0x64/0x98) [2.210815] [] (bus_for_each_drv) from [] (__device_attach+0xb0/0x118) [2.219635] [] (__device_attach) from [] (bus_probe_device+0x88/0x90) [2.228363] [] (bus_probe_device) from [] (deferred_probe_work_func+0x60/0x90) [2.237884] [] (deferred_probe_work_func) from [] (process_one_work+0x1a4/0x558) [2.247619] [] (process_one_work) from [] (worker_thread+0x3c/0x514) [2.256256] [] (worker_thread) from [] (kthread+0xd4/0xf0) [2.263946] [] (kthread) from [] (ret_from_fork+0x14/0x24) [2.271606] ---[ end trace 814b02d2fa769522 ]--- -- Sebastian signature.asc Description: PGP signature
[PATCH] twl4030_charger: add missing iio dependency
This driver fails to link without CONFIG_IIO, since there are no stubs for the iio_channels functions. Signed-off-by: Sebastian Reichel <s...@kernel.org> --- drivers/power/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig index 9e68853217ca..cb0ae666dc68 100644 --- a/drivers/power/Kconfig +++ b/drivers/power/Kconfig @@ -313,7 +313,7 @@ config CHARGER_MAX8903 config CHARGER_TWL4030 tristate "OMAP TWL4030 BCI charger driver" - depends on TWL4030_CORE + depends on IIO && TWL4030_CORE help Say Y here to enable support for TWL4030 Battery Charge Interface. -- 2.6.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] ARM: dts: omap3: keep ssi ports by default
Hi, On Wed, Oct 14, 2015 at 01:44:16PM +0300, Roger Quadros wrote: > Let's keep the SSI ports disabled in the omap3.dtsi to avoid > getting the following noise on the console for boards that don't > use the SSI ports. > > "omap_ssi_port 4805a000.ssi-port: DT data is missing cawake gpio (err=-2)" > > As omap3-n900 uses one SSI port, mark it enabled there. > > Signed-off-by: Roger Quadros <rog...@ti.com> Acked-By: Sebastian Reichel <s...@kernel.org> -- Sebastian signature.asc Description: PGP signature
Re: [PATCH 1/2] hsi: omap_ssi_port: Prevent warning if cawake_gpio is not defined.
Hi, On Wed, Oct 14, 2015 at 01:44:15PM +0300, Roger Quadros wrote: > The error handling path is broken as cawake_gpio was defined as > unsigned integer causing the following warnings on boards that don't > use SSI port and so don't have cawake_gpio defined. e.g. beagleboard C4. > > [...] Thanks, I queued this one together with a Fixes: b209e047bc743 ("HSI: Introduce OMAP SSI driver") -- Sebastian signature.asc Description: PGP signature
Re: [PATCH 2/2] ARM: dts: omap3: keep ssi ports by default
Hi Pali, On Wed, Oct 14, 2015 at 12:53:04PM +0200, Pali Rohár wrote: > On Wednesday 14 October 2015 13:44:16 Roger Quadros wrote: > > Let's keep the SSI ports disabled in the omap3.dtsi to avoid > > getting the following noise on the console for boards that don't > > use the SSI ports. > > > > "omap_ssi_port 4805a000.ssi-port: DT data is missing cawake gpio (err=-2)" > > > > As omap3-n900 uses one SSI port, mark it enabled there. > > > > Sebastian, why is second SSI port disabled on N900? It is not used or > in DTS file are missing some definitions? Since the second SSI port is not used on the Nokia N900. It's pins are used for other things, e.g. as GPIO. It's easily verifiable by checking the mux data: $ grep -C1 "ssi2_" arch/arm/mach-omap2/mux34xx.c _OMAP3_MUXENTRY(CAM_D10, 109, "cam_d10", "ssi2_wake", NULL, NULL, "gpio_109", "hw_dbg8", NULL, "safe_mode"), _OMAP3_MUXENTRY(CAM_D2, 101, "cam_d2", "ssi2_rdy_tx", NULL, NULL, "gpio_101", "hw_dbg4", NULL, "safe_mode"), _OMAP3_MUXENTRY(CAM_D3, 102, "cam_d3", "ssi2_dat_rx", NULL, NULL, "gpio_102", "hw_dbg5", NULL, "safe_mode"), _OMAP3_MUXENTRY(CAM_D4, 103, "cam_d4", "ssi2_flag_rx", NULL, NULL, "gpio_103", "hw_dbg6", NULL, "safe_mode"), _OMAP3_MUXENTRY(CAM_D5, 104, "cam_d5", "ssi2_rdy_rx", NULL, NULL, "gpio_104", "hw_dbg7", NULL, "safe_mode"), _OMAP3_MUXENTRY(CAM_HS, 94, "cam_hs", "ssi2_dat_tx", NULL, NULL, "gpio_94", "hw_dbg0", NULL, "safe_mode"), _OMAP3_MUXENTRY(CAM_VS, 95, "cam_vs", "ssi2_flag_tx", NULL, NULL, "gpio_95", "hw_dbg1", NULL, "safe_mode"), At least gpio 104 is already used for resetting the tsc2005. -- Sebastian signature.asc Description: PGP signature
Re: [PATCH 2/2] ARM: dts: omap3: keep ssi ports by default
Hi, On Wed, Oct 14, 2015 at 02:27:27PM +0300, Roger Quadros wrote: > On 14/10/15 14:19, Sebastian Reichel wrote: > > On Wed, Oct 14, 2015 at 01:44:16PM +0300, Roger Quadros wrote: > >> Let's keep the SSI ports disabled in the omap3.dtsi to avoid > >> getting the following noise on the console for boards that don't > >> use the SSI ports. > >> > >> "omap_ssi_port 4805a000.ssi-port: DT data is missing cawake gpio (err=-2)" > >> > >> As omap3-n900 uses one SSI port, mark it enabled there. > > Would it be preferable to disable the ssi-controller node as well in the > omap3.dtsi file? If I remember it correctly, existing, but unused IP-Cores should not be disabled in DT, so that hwmod picks them up for power management. Note, that it actually is disabled in omap3.dtsi and then enabled in omap34xx/omap36xx dts files (the other variants do not have an ssi module). -- Sebastian signature.asc Description: PGP signature
Re: [PATCH] ARM: AM35xx: Add M-USB clk device ID
Hi, On Tue, Oct 13, 2015 at 05:57:59PM -0500, Felipe Balbi wrote: > Sebastian Reichel <s...@kernel.org> writes: > > On Tue, Oct 13, 2015 at 10:50:45AM -0500, Felipe Balbi wrote: > >> Rolf Peukert <rolf.peuk...@imms.de> writes: > >> > On 13.10.2015 10:15, Tero Kristo wrote: > >> >> On 10/12/2015 06:22 PM, Rolf Peukert wrote: > >> >>> The glue code in drivers/usb/musb/am35x.c calls clk_get() to get its > >> >>> interface and function clocks for the M-USB controller. These calls > >> >>> fail > >> >>> in the current kernel. This patch adds clock definitions containing the > >> >>> device ID to the list in clk-3xxx.c, so the calls to clk_get() in > >> >>> am35x.c can succeed. > >> >>> > >> >>> Signed-off-by: Rolf Peukert <rolf.peuk...@imms.de> > >> >>> > >> >>> --- > >> >>> drivers/clk/ti/clk-3xxx.c | 2 ++ > >> >>> 1 file changed, 2 insertions(+) > >> >>> > >> >>> diff --git a/drivers/clk/ti/clk-3xxx.c b/drivers/clk/ti/clk-3xxx.c > >> >>> index 8831e1a..b635deb 100644 > >> >>> --- a/drivers/clk/ti/clk-3xxx.c > >> >>> +++ b/drivers/clk/ti/clk-3xxx.c > >> >>> @@ -507,7 +507,9 @@ static struct ti_dt_clk am35xx_clks[] = { > >> >>> DT_CLK("davinci_mdio.0", NULL, "emac_fck"), > >> >>> DT_CLK("vpfe-capture", "master", "vpfe_ick"), > >> >>> DT_CLK("vpfe-capture", "slave", "vpfe_fck"), > >> >>> +DT_CLK("5c04.am35x_otg_hs", "ick", "hsotgusb_ick_am35xx"), > >> >>> DT_CLK(NULL, "hsotgusb_ick", "hsotgusb_ick_am35xx"), > >> >>> +DT_CLK("5c04.am35x_otg_hs", "fck", "hsotgusb_fck_am35xx"), > >> >>> DT_CLK(NULL, "hsotgusb_fck", "hsotgusb_fck_am35xx"), > >> >>> DT_CLK(NULL, "hecc_ck", "hecc_ck"), > >> >>> DT_CLK(NULL, "uart4_ick", "uart4_ick_am35xx"), > >> >>> > >> >> > >> >> Adding clock aliases should be avoided, isn't there any other way to fix > >> >> this issue? Like adding clocks = <> references under the DT node? > >> >> > >> >> -Tero > >> >> > >> > > >> > Yes, I just tried adding the lines > >> > > >> > clocks = <_ick_am35xx>, <_fck_am35xx>; > >> > clock-names = "ick", "fck"; > >> > > >> > to am3517.dtsi and this works too. But wouldn't this mean the driver > >> > will not work anymore in kernels without DT support? > >> > >> I have this doubt myself. This will break on non-DT boots and, > >> while we're trying to move to DT-only, IMO meanwhile we should > >> allow for fixes to DT and non-DT world. Once the conversion is > >> done, fine. > > > > Isn't am35xx already DT-only? The remaining omap2+ boards are both > > omap3430 based: > > yeah, and this system is omap3 based, not am335x based ;-) Sure, am35xx depends on omap3 and omap3 still supports platform based booting because of the mentioned boards, but that does not mean, that am35xx also needs to support legacy booting. From what I can see, the last am35xx board has been removed in v4.0 [0] together with the am35xx platform headers. So while omap3 can still be booted the legacy way, am35xx cannot without modifying the kernel. Other omap3 based SoCs will initialize musb's omap2430 gluecode, so they are not affected. [0] https://git.kernel.org/cgit/linux/kernel/git/tmlind/linux-omap.git/tag/?id=omap-for-v3.20/drop-legacy-3517-v2 -- Sebastian signature.asc Description: PGP signature
Re: [PATCH] ARM: AM35xx: Add M-USB clk device ID
Hi, On Tue, Oct 13, 2015 at 10:50:45AM -0500, Felipe Balbi wrote: > Rolf Peukertwrites: > > On 13.10.2015 10:15, Tero Kristo wrote: > >> On 10/12/2015 06:22 PM, Rolf Peukert wrote: > >>> The glue code in drivers/usb/musb/am35x.c calls clk_get() to get its > >>> interface and function clocks for the M-USB controller. These calls fail > >>> in the current kernel. This patch adds clock definitions containing the > >>> device ID to the list in clk-3xxx.c, so the calls to clk_get() in > >>> am35x.c can succeed. > >>> > >>> Signed-off-by: Rolf Peukert > >>> > >>> --- > >>> drivers/clk/ti/clk-3xxx.c | 2 ++ > >>> 1 file changed, 2 insertions(+) > >>> > >>> diff --git a/drivers/clk/ti/clk-3xxx.c b/drivers/clk/ti/clk-3xxx.c > >>> index 8831e1a..b635deb 100644 > >>> --- a/drivers/clk/ti/clk-3xxx.c > >>> +++ b/drivers/clk/ti/clk-3xxx.c > >>> @@ -507,7 +507,9 @@ static struct ti_dt_clk am35xx_clks[] = { > >>> DT_CLK("davinci_mdio.0", NULL, "emac_fck"), > >>> DT_CLK("vpfe-capture", "master", "vpfe_ick"), > >>> DT_CLK("vpfe-capture", "slave", "vpfe_fck"), > >>> +DT_CLK("5c04.am35x_otg_hs", "ick", "hsotgusb_ick_am35xx"), > >>> DT_CLK(NULL, "hsotgusb_ick", "hsotgusb_ick_am35xx"), > >>> +DT_CLK("5c04.am35x_otg_hs", "fck", "hsotgusb_fck_am35xx"), > >>> DT_CLK(NULL, "hsotgusb_fck", "hsotgusb_fck_am35xx"), > >>> DT_CLK(NULL, "hecc_ck", "hecc_ck"), > >>> DT_CLK(NULL, "uart4_ick", "uart4_ick_am35xx"), > >>> > >> > >> Adding clock aliases should be avoided, isn't there any other way to fix > >> this issue? Like adding clocks = <> references under the DT node? > >> > >> -Tero > >> > > > > Yes, I just tried adding the lines > > > > clocks = <_ick_am35xx>, <_fck_am35xx>; > > clock-names = "ick", "fck"; > > > > to am3517.dtsi and this works too. But wouldn't this mean the driver > > will not work anymore in kernels without DT support? > > I have this doubt myself. This will break on non-DT boots and, > while we're trying to move to DT-only, IMO meanwhile we should > allow for fixes to DT and non-DT world. Once the conversion is > done, fine. Isn't am35xx already DT-only? The remaining omap2+ boards are both omap3430 based: $ grep "^MACHINE_START(" arch/arm/mach-omap2/* arch/arm/mach-omap2/board-ldp.c:MACHINE_START(OMAP_LDP, "OMAP LDP board") arch/arm/mach-omap2/board-rx51.c:MACHINE_START(NOKIA_RX51, "Nokia RX-51 board") -- Sebastian signature.asc Description: PGP signature
Re: [PATCH v3] ARM: dts: twl4030: Add iio properties for bci subnode
Hi, On Mon, Oct 12, 2015 at 03:20:10PM -0700, Tony Lindgren wrote: > * Tony Lindgren[151012 14:43]: > > * Belisko Marek [150926 13:02]: > > > Tony sorry I forgot to add you to the recipients for this patchset. > > > Can you please queue this patch. Many thanks. > > > > OK applying into omap-for-v4.4/dt thanks. > > Actually dropping this one, it makes build fail as we don't > have twl4030_madc yet. > > Maybe please send a separate set of dts patches for me. mh that's strange, twl4030-madc is there since a long time. But checking the patch, it seems Marek got the phandle wrong: $ grep -B1 "ti,twl4030-madc" arch/arm/boot/dts/twl4030.dtsi twl_madc: madc { compatible = "ti,twl4030-madc"; Once that is fixed, the patch should have no dependencies. -- Sebastian signature.asc Description: PGP signature
Re: [PATCH] arm: omap2: timer: don't disable our timers
Hi, On Mon, Oct 05, 2015 at 06:41:37PM -0500, Suman Anna wrote: > We will gain a user from OMAP remoteproc driver as well (out of tree at > the moment, but it does follow the DT phandle and > omap_dm_timer_request_by_node semantics). I do not think ir-rx51.c is > converted to DT, and also some of the API are alive just because of the > continued OMAP3 legacy boot support. Guess, it is a just a question of > not breaking existing API until we kill some of them. Right, ir-rx51 has not yet been converted to DT. Additionally it depends !ARCH_MULTIPLATFORM, since it requires . I remember a patchset adding a omap-pwm driver using dmtimers. If that was added to the kernel, ir-rx51 could probably be switched to the PWM API + hrtimer API instead of depending on the dmtimer API. At the end not much is gained, though, since then the PWM driver would probably require the dmtimer API. -- Sebastian signature.asc Description: PGP signature
Re: [PATCHv2 2/2] power_supply: Add support for tps65217-charger.
Hi, On Thu, Sep 24, 2015 at 09:23:25AM +0200, Enric Balletbo i Serra wrote: > This patch adds support for the tps65217 charger driver. This driver is > responsible for controlling the charger aspect of the tps65217 mfd. > Currently, this mainly consists of turning on and off the charger, but > some other features of the charger can be supported through this driver. > > [...] > > +static int tps65217_ac_get_property(struct power_supply *psy, > + enum power_supply_property psp, > + union power_supply_propval *val) > +{ > + struct tps65217_charger *charger = power_supply_get_drvdata(psy); > + > + if (psp == POWER_SUPPLY_PROP_ONLINE) { > + val->intval = charger->ac_online; > + charger->prev_ac_online = charger->ac_online; I think this is no longer needed at this place. > + return 0; > + } > + return -EINVAL; > +} > > [...] > > +static int tps65217_charger_remove(struct platform_device *pdev) > +{ > + struct tps65217_charger *charger = platform_get_drvdata(pdev); > + > + kthread_stop(charger->poll_task); > + > + power_supply_unregister(charger->ac); This is not needed with devm_power_supply_register() and actually it's wrong, since it would be called again by managed resources infrastructure. > + return 0; > +} -- Sebastian signature.asc Description: Digital signature
Re: [PATCHv3 0/2] Add support for tps65217 charger
Hi, On Thu, Sep 24, 2015 at 09:44:19PM +0200, Enric Balletbo i Serra wrote: > The following series add initial support for tps65217 battery charger. Thanks, queued. -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 2/3] power_supply: Add support for tps65217-charger.
Hi, On Tue, Sep 08, 2015 at 10:09:38AM +0200, Enric Balletbo i Serra wrote: > This patch adds support for the tps65217 charger driver. This driver is > responsible for controlling the charger aspect of the tps65217 mfd. > Currently, this mainly consists of turning on and off the charger, but > some other features of the charger can be supported through this driver. Driver looks mostly fine. I have two comments though: > [...] > > +static int tps65217_ac_get_property(struct power_supply *psy, > + enum power_supply_property psp, > + union power_supply_propval *val) > +{ > + struct tps65217_charger *charger = power_supply_get_drvdata(psy); > + > + if (psp == POWER_SUPPLY_PROP_ONLINE) { > + val->intval = charger->ac_online; > + charger->prev_ac_online = charger->ac_online; I think prev_ac_online should be set at the beginning of tps65217_charger_irq(). > [...] > > +static int tps65217_charger_probe(struct platform_device *pdev) > +{ > > [...] > > + charger->ac = power_supply_register(>dev, > + _charger_desc, NULL); > + if (IS_ERR(charger->ac)) { > + dev_err(>dev, "failed: power supply register\n"); > + return PTR_ERR(charger->ac); > + } You can use devm_power_supply_register(...) to simplify the driver a bit more. -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 3/3] mfd: Add battery charger as subdevice to the tps65217.
Hi, On Tue, Sep 22, 2015 at 09:43:50AM +0200, Enric Balletbo Serra wrote: > 2015-09-20 6:19 GMT+02:00 Lee Jones: > > On Tue, 08 Sep 2015, Enric Balletbo i Serra wrote: > > > >> Add tps65217 battery charger subdevice. > >> > >> Signed-off-by: Enric Balletbo i Serra > >> --- > >> drivers/mfd/tps65217.c | 4 > >> 1 file changed, 4 insertions(+) > > > > Applied, thanks. > > > > Many thanks, any feedback about ? > > [PATCH 1/3] devicetree: Add TPS65217 charger binding > [PATCH 2/3] power_supply: Add support for tps65217-charger. > > Or should go through another tree ? Those go through my tree. I'm currently catching up with my backlog. I will have a look at these later. -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 03/13] twl4030_charger: correctly handle -EPROBE_DEFER from devm_usb_get_phy_by_node
Hi, On Tue, Sep 08, 2015 at 01:14:17PM -0700, Tony Lindgren wrote: > * Kevin Hilman[150908 11:36]: > > On Wed, Sep 2, 2015 at 6:07 AM, Tony Lindgren wrote: > > > * Neil Brown [150901 23:23]: > > >> Kevin Hilman writes: > > >> > > >> > ping... this boot failure has now landed in mainline > > >> > > >> sorry, I'm on leave at the moment and travelling so I'm unlikely to be > > >> able to look at this properly. I should be able to examine this issue > > >> before the end of the month but cannot promise sooner than that (though > > >> it is not impossible). > > >> > > >> Maybe it would be best to just revert it until a proper analysis can be > > >> done. > > > > > > OK yeah let's revert this one for now until we know what goes wrong. > > > > Looks like this is still in mainline. > > > > Tony, can you revert? > > Probably best that Sebastian does it as there's another fix needed > too. It seems the following are needed: > > - Revert $subject patch 3fc3895e4fe1 ("twl4030_charger: correctly > handle -EPROBE_DEFER from devm_usb_get_phy_by_node") > > - Apply compile fix "[PATCH] twl4030_charger: fix another compile > error" > > Just in case Sebastian is travelling or something.. Right, I was on vacation without internet access until now. > Sebastian, can you please confirm? Sounds fine to me. I will take care of it once I've slept a bit. -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 03/13] twl4030_charger: correctly handle -EPROBE_DEFER from devm_usb_get_phy_by_node
Hi, On Thu, Sep 10, 2015 at 10:08:50AM +0200, Sebastian Reichel wrote: > > Probably best that Sebastian does it as there's another fix needed > > too. It seems the following are needed: > > > > - Revert $subject patch 3fc3895e4fe1 ("twl4030_charger: correctly > > handle -EPROBE_DEFER from devm_usb_get_phy_by_node") > > > > - Apply compile fix "[PATCH] twl4030_charger: fix another compile > > error" I just added these to my next branch: https://git.kernel.org/cgit/linux/kernel/git/sre/linux-power-supply.git/commit/?h=next=aefc574e74bb891ba392d98f2d59a417c774 https://git.kernel.org/cgit/linux/kernel/git/sre/linux-power-supply.git/commit/?h=next=e11fc21e756e662e465cac3da6547d438d0b1446 -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 07/13] twl4030_charger: distinguish between USB current and 'AC' current
Hi, This actually slipped through my review. IMHO madc should be accessed through IIO, as already done for twl4030-madc-battery and rx51-battery. That way the custom API can be removed at some point. Anyway, I queued the below patch with Tony's ACK to fix the build issue in next. On Fri, Aug 07, 2015 at 01:45:25PM +1000, NeilBrown wrote: From: NeilBrown n...@brown.name Date: Fri, 7 Aug 2015 13:44:37 +1000 Subject: [PATCH] twl4030_charger: fix compile error when TWL4030_MADC not available. We can only use the madc to check for 'ac' availability if the madc has been compiled in. If not: assume always using USB. Reported-by: Tony Lindgren t...@atomide.com Signed-off-by: NeilBrown n...@brown.name diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c index c7432f532a83..265fd236f4c0 100644 --- a/drivers/power/twl4030_charger.c +++ b/drivers/power/twl4030_charger.c @@ -91,6 +91,21 @@ #define TWL4030_MSTATEC_COMPLETE10x0b #define TWL4030_MSTATEC_COMPLETE40x0e +#if IS_ENABLED(CONFIG_TWL4030_MADC) +/* + * If AC (Accessory Charger) voltage exceeds 4.5V (MADC 11) + * then AC is available. + */ +static inline int ac_available(void) +{ + return twl4030_get_madc_conversion(11) 4500; +} +#else +static inline int ac_available(void) +{ + return 0; +} +#endif static bool allow_usb; module_param(allow_usb, bool, 0644); MODULE_PARM_DESC(allow_usb, Allow USB charge drawing default current); @@ -263,7 +278,7 @@ static int twl4030_charger_update_current(struct twl4030_bci *bci) * If AC (Accessory Charger) voltage exceeds 4.5V (MADC 11) * and AC is enabled, set current for 'ac' */ - if (twl4030_get_madc_conversion(11) 4500) { + if (ac_available()) { cur = bci-ac_cur; bci-ac_is_active = true; } else { -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 00/13] Enhance twl4030_charger functionality. - V3
Hi, On Thu, Jul 30, 2015 at 10:11:24AM +1000, NeilBrown wrote: Following is most of my twl4030_charger patches, rebased against git://git.infradead.org/battery-2.6 Since the previous set I have added the conversion to module_platform_driver so EPROBE_DEFER can be used, and fixed a few minor typos. This does not include the changes to add extcon support, in part because extcon has seen some changes lately which leave me even more confused about how best to use it than before. I need to sort that out before I can resolve the rest of my usb phy patches and then add a few more charger patches. Thanks, queued. -- Sebastian signature.asc Description: Digital signature
Re: linux 4.2-rc1 broken Nokia N900
Hi Pali, On Tue, Jul 28, 2015 at 10:39:32AM +0200, Pali Rohár wrote: Sebastian or Michael: Can you add check for pm_runtime_get_sync() function and send patch for including in mainline kernel? This actually already happened before your Tested-By. I accidently did not CC you, sorry for that: https://lkml.org/lkml/2015/7/22/581 https://git.kernel.org/cgit/linux/kernel/git/broonie/spi.git/commit/?h=for-linusid=5f74db105b1c0980c9863e7a7d1bc0525e0316e8 -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig
Hi Ben, On Mon, Jul 27, 2015 at 10:59:56AM +0100, Ben Dooks wrote: I think you missed the part adding the !ARCH_MULTIPLATFORM dependency in Kconfig for ARM_ERRATA_430973. I only removed the check in the sourcecode, since it is no longer required with the dependency being in Kconfig. So I guess there are 3 options now: 1. Add !ARCH_MULTIPLATFORM dependency to Kconfig, keep extra check in the sourcecode 2. Add !ARCH_MULTIPLATFORM dependency to Kconfig, remove extra check in the sourcecode 3. Remove !ARCH_MULTIPLATFORM dependency alltogether I will send an appropriate patch, if you tell me your preferred option. This isn't the only place ARM_ERRATA_430973 is used, [...] The dependency on ARM_ERRATA_430973 has been removed from arch/arm/mm/proc-v7-2level.S in 4.1 (commit id e748994), so that it always flushes. The only additional places are in the Nokia N900 boardcode and the N900 pdata-quirk, which are removed in PATCH 1/3. So actually it is the only place. -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig
Hi, On Sun, Jul 26, 2015 at 11:51:45PM +0100, Russell King - ARM Linux wrote: On Fri, Jul 24, 2015 at 02:16:06AM +0200, Sebastian Reichel wrote: On Thu, Jul 23, 2015 at 01:35:53PM +0100, Russell King - ARM Linux wrote: On Thu, Jul 23, 2015 at 02:48:03AM +0200, Sebastian Reichel wrote: Having the !ARCH_MULTIPLATFORM dependency in the Kconfig file results in one option less to think about when configuring the kernel. -#if defined(CONFIG_ARM_ERRATA_430973) !defined(CONFIG_ARCH_MULTIPLATFORM) +#ifdef CONFIG_ARM_ERRATA_430973 teq r3, #0x0010 @ only present in r1p* mrceq p15, 0, r0, c1, c0, 1 @ read aux control register orreq r0, r0, #(1 6) @ set IBE to 1 NAK. Please read the mailing list history, I'm not repeating myself again on this. Thanks. It's a bit hard to search the mailing list history without a bit more information. You were Cc'd on the previous round of review... But that discussion was about removing the check alltogether iirc. This patch does not remove the !ARCH_MULTIPLATFORM check. It just *moves* it from the sourcecode to the errata's Kconfig entry. The intention was to hide the Kconfig option on multiplatform kernels, since it's completely useless there after the N900 boardcode has been changed (PATCH 1/3). I guess you prefer to just add the !ARCH_MULTIPLATFORM dependency to the Kconfig entry without removing the additional check in the code? I was referring to the above change. However, having discussed with Will Deacon and checked the manuals, I think the change is okay after all: the auxillary control register is banked on secure parts, and the bit we'll be trying to change will be read-only in non-secure mode - and importantly won't fault. So, the change is fine, thanks. I think you missed the part adding the !ARCH_MULTIPLATFORM dependency in Kconfig for ARM_ERRATA_430973. I only removed the check in the sourcecode, since it is no longer required with the dependency being in Kconfig. So I guess there are 3 options now: 1. Add !ARCH_MULTIPLATFORM dependency to Kconfig, keep extra check in the sourcecode 2. Add !ARCH_MULTIPLATFORM dependency to Kconfig, remove extra check in the sourcecode 3. Remove !ARCH_MULTIPLATFORM dependency alltogether I will send an appropriate patch, if you tell me your preferred option. -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 01/14] twl4030_charger: use devm_request_threaded_irq
Hi, On Mon, Mar 23, 2015 at 10:20:28AM +1100, NeilBrown wrote: From: NeilBrown ne...@suse.de This simplifies the error paths. Signed-off-by: NeilBrown ne...@suse.de I queued this with Pavel's ACK after a rebase to current master: http://git.infradead.org/battery-2.6.git/commit/1b7cac23419e1398eac4c28368da6671c9c4ce9d -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 02/14] twl4030_charger: use devres for power_supply_register and kzalloc.
Hi, On Mon, Mar 23, 2015 at 10:20:28AM +1100, NeilBrown wrote: From: NeilBrown ne...@suse.de Final allocations/registrations are now managed by devres. Signed-off-by: NeilBrown ne...@suse.de Thanks for the patch, rebased to current master and queued with Pavel's ACK: http://git.infradead.org/battery-2.6.git/commit/325b50aa5d1c7dae57d1e44defdbacd1e2bcabde -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 00/14] Enhance twl4030_charger functionality. - V2
Hi Neil, On Mon, Mar 23, 2015 at 10:20:28AM +1100, NeilBrown wrote: here is V2 of my patches to improve the twl4030 charger. They include improved documentation and removal of changes to the CVENAC bit which I didn't properly understand. I rebased and queued patches 1 and 2. Can you rebase the other patches and take care of the remaining comments? -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig
Hi Russel, On Thu, Jul 23, 2015 at 01:35:53PM +0100, Russell King - ARM Linux wrote: On Thu, Jul 23, 2015 at 02:48:03AM +0200, Sebastian Reichel wrote: Having the !ARCH_MULTIPLATFORM dependency in the Kconfig file results in one option less to think about when configuring the kernel. -#if defined(CONFIG_ARM_ERRATA_430973) !defined(CONFIG_ARCH_MULTIPLATFORM) +#ifdef CONFIG_ARM_ERRATA_430973 teq r3, #0x0010 @ only present in r1p* mrceq p15, 0, r0, c1, c0, 1 @ read aux control register orreq r0, r0, #(1 6) @ set IBE to 1 NAK. Please read the mailing list history, I'm not repeating myself again on this. Thanks. It's a bit hard to search the mailing list history without a bit more information. I guess you prefer to just add the !ARCH_MULTIPLATFORM dependency to the Kconfig entry without removing the additional check in the code? -- Sebastian signature.asc Description: Digital signature
[PATCH 0/5] [input] tsc2005 cleanup
Hi, The following patches simplify and cleanup the tsc2005 touchscreen driver. Apart from making the driver more readable, the direct usage of SPI has been reduced to one function, so that tsc2004 support may be addable now (see [0]). Changes since PATCHv1 [1]: * Avoid mixing spi_*_drvdata() and dev_*_drvdata() by converting all spi_*_drvdata() to dev_*_drvdata() * Add new patch fixing the indent of TSC2005's Kconfig entry * Select REGMAP_SPI in TSC2005's Kconfig entry * Use optional gpiod and regulator API, so that the DT check can be removed * Set TSC2005_REG_PND0 on regmap writes, since it has also been used before the regmap conversion. [0] http://permalink.gmane.org/gmane.linux.kernel.input/37513 [1] https://lkml.org/lkml/2015/7/15/500 -- Sebastian Sebastian Reichel (5): Input: tsc2005 - improve readability of register defines Input: tsc2005 - fix Kconfig indentation Input: tsc2005 - convert to regmap Input: tsc2005 - simplify drvdata acquisition Input: tsc2005 - convert to gpiod drivers/input/touchscreen/Kconfig | 9 +- drivers/input/touchscreen/tsc2005.c | 262 ++-- 2 files changed, 106 insertions(+), 165 deletions(-) -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/5] Input: tsc2005 - convert to gpiod
The GPIOD API can be used from boardcode, so that the DT check can be removed. To avoid breaking existing boardcode, _optional() variant has been chosen. For completly removing the DT check, the regulator has also been made optional, so that it could be supplied from boardcode. As a side-effect the patch fixes the after-probe reset GPIO state, so that the device is not kept in reset state. Signed-off-by: Sebastian Reichel s...@kernel.org --- drivers/input/touchscreen/tsc2005.c | 47 ++--- 1 file changed, 18 insertions(+), 29 deletions(-) diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index f82b860..bf1b782 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c @@ -30,11 +30,11 @@ #include linux/delay.h #include linux/pm.h #include linux/of.h -#include linux/of_gpio.h #include linux/spi/spi.h #include linux/spi/tsc2005.h #include linux/regulator/consumer.h #include linux/regmap.h +#include linux/gpio/consumer.h /* * The touchscreen interface operates as follows: @@ -180,7 +180,7 @@ struct tsc2005 { struct regulator*vio; - int reset_gpio; + struct gpio_desc*reset_gpio; void(*set_reset)(bool enable); }; @@ -318,8 +318,8 @@ static void tsc2005_stop_scan(struct tsc2005 *ts) static void tsc2005_set_reset(struct tsc2005 *ts, bool enable) { - if (ts-reset_gpio = 0) - gpio_set_value(ts-reset_gpio, enable); + if (ts-reset_gpio) + gpiod_set_value_cansleep(ts-reset_gpio, enable); else if (ts-set_reset) ts-set_reset(enable); } @@ -611,34 +611,23 @@ static int tsc2005_probe(struct spi_device *spi) ts-x_plate_ohm = x_plate_ohm; ts-esd_timeout = esd_timeout; - if (np) { - ts-reset_gpio = of_get_named_gpio(np, reset-gpios, 0); - if (ts-reset_gpio == -EPROBE_DEFER) - return ts-reset_gpio; - if (ts-reset_gpio 0) { - dev_err(spi-dev, error acquiring reset gpio: %d\n, - ts-reset_gpio); - return ts-reset_gpio; - } + ts-reset_gpio = devm_gpiod_get_optional(spi-dev, reset, +GPIOD_OUT_HIGH); + if (IS_ERR(ts-reset_gpio)) { + error = PTR_ERR(ts-reset_gpio); + dev_err(spi-dev, error acquiring reset gpio: %d\n, error); + return error; + } - error = devm_gpio_request_one(spi-dev, ts-reset_gpio, 0, - reset-gpios); - if (error) { - dev_err(spi-dev, error requesting reset gpio: %d\n, - error); - return error; - } + ts-vio = devm_regulator_get_optional(spi-dev, vio); + if (IS_ERR(ts-vio)) { + error = PTR_ERR(ts-vio); + dev_err(spi-dev, vio regulator missing (%d), error); + return error; + } - ts-vio = devm_regulator_get(spi-dev, vio); - if (IS_ERR(ts-vio)) { - error = PTR_ERR(ts-vio); - dev_err(spi-dev, vio regulator missing (%d), error); - return error; - } - } else { - ts-reset_gpio = -1; + if(!ts-reset_gpio pdata) ts-set_reset = pdata-set_reset; - } mutex_init(ts-mutex); -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/5] Input: tsc2005 - simplify drvdata acquisition
Using dev_*_drvdata() instead of spi_*_drvdata() reduces lines of code and prepares the driver for possible tsc2004 support, which is i2c based. Signed-off-by: Sebastian Reichel s...@kernel.org --- drivers/input/touchscreen/tsc2005.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index bd05389..f82b860 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c @@ -355,8 +355,7 @@ static ssize_t tsc2005_selftest_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct spi_device *spi = to_spi_device(dev); - struct tsc2005 *ts = spi_get_drvdata(spi); + struct tsc2005 *ts = dev_get_drvdata(dev); unsigned int temp_high; unsigned int temp_high_orig; unsigned int temp_high_test; @@ -441,8 +440,7 @@ static umode_t tsc2005_attr_is_visible(struct kobject *kobj, struct attribute *attr, int n) { struct device *dev = container_of(kobj, struct device, kobj); - struct spi_device *spi = to_spi_device(dev); - struct tsc2005 *ts = spi_get_drvdata(spi); + struct tsc2005 *ts = dev_get_drvdata(dev); umode_t mode = attr-mode; if (attr == dev_attr_selftest.attr) { @@ -690,7 +688,7 @@ static int tsc2005_probe(struct spi_device *spi) return error; } - spi_set_drvdata(spi, ts); + dev_set_drvdata(spi-dev, ts); error = sysfs_create_group(spi-dev.kobj, tsc2005_attr_group); if (error) { dev_err(spi-dev, @@ -718,7 +716,7 @@ disable_regulator: static int tsc2005_remove(struct spi_device *spi) { - struct tsc2005 *ts = spi_get_drvdata(spi); + struct tsc2005 *ts = dev_get_drvdata(spi-dev); sysfs_remove_group(spi-dev.kobj, tsc2005_attr_group); @@ -730,8 +728,7 @@ static int tsc2005_remove(struct spi_device *spi) static int __maybe_unused tsc2005_suspend(struct device *dev) { - struct spi_device *spi = to_spi_device(dev); - struct tsc2005 *ts = spi_get_drvdata(spi); + struct tsc2005 *ts = dev_get_drvdata(dev); mutex_lock(ts-mutex); @@ -747,8 +744,7 @@ static int __maybe_unused tsc2005_suspend(struct device *dev) static int __maybe_unused tsc2005_resume(struct device *dev) { - struct spi_device *spi = to_spi_device(dev); - struct tsc2005 *ts = spi_get_drvdata(spi); + struct tsc2005 *ts = dev_get_drvdata(dev); mutex_lock(ts-mutex); -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/5] Input: tsc2005 - fix Kconfig indentation
Replace spaces with tab, so that the tsc2005 Kconfig entry matches the other entries in drivers/input/touchscreen/Kconfig. Signed-off-by: Sebastian Reichel s...@kernel.org --- drivers/input/touchscreen/Kconfig | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index a854c6e..f0bc42c 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -915,10 +915,10 @@ config TOUCHSCREEN_TSC_SERIO module will be called tsc40. config TOUCHSCREEN_TSC2005 -tristate TSC2005 based touchscreens -depends on SPI_MASTER -help - Say Y here if you have a TSC2005 based touchscreen. + tristate TSC2005 based touchscreens + depends on SPI_MASTER + help + Say Y here if you have a TSC2005 based touchscreen. If unsure, say N. -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/5] Input: tsc2005 - convert to regmap
Convert driver, so that it uses regmap instead of directly using spi_transfer for all register accesses. Signed-off-by: Sebastian Reichel s...@kernel.org --- drivers/input/touchscreen/Kconfig | 1 + drivers/input/touchscreen/tsc2005.c | 171 +--- 2 files changed, 60 insertions(+), 112 deletions(-) diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig index f0bc42c..b987d56 100644 --- a/drivers/input/touchscreen/Kconfig +++ b/drivers/input/touchscreen/Kconfig @@ -917,6 +917,7 @@ config TOUCHSCREEN_TSC_SERIO config TOUCHSCREEN_TSC2005 tristate TSC2005 based touchscreens depends on SPI_MASTER + select REGMAP_SPI help Say Y here if you have a TSC2005 based touchscreen. diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index 87038b2..bd05389 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c @@ -34,6 +34,7 @@ #include linux/spi/spi.h #include linux/spi/tsc2005.h #include linux/regulator/consumer.h +#include linux/regmap.h /* * The touchscreen interface operates as follows: @@ -120,20 +121,37 @@ #define TSC2005_SPI_MAX_SPEED_HZ 1000 #define TSC2005_PENUP_TIME_MS 40 -struct tsc2005_spi_rd { - struct spi_transfer spi_xfer; - u32 spi_tx; - u32 spi_rx; +static const struct regmap_range tsc2005_writable_ranges[] = { + regmap_reg_range(TSC2005_REG_AUX_HIGH, TSC2005_REG_CFR2), }; +static const struct regmap_access_table tsc2005_writable_table = { + .yes_ranges = tsc2005_writable_ranges, + .n_yes_ranges = ARRAY_SIZE(tsc2005_writable_ranges), +}; + +static struct regmap_config tsc2005_regmap_config = { + .reg_bits = 8, + .val_bits = 16, + .reg_stride = 0x08, + .max_register = 0x78, + .read_flag_mask = TSC2005_REG_READ, + .write_flag_mask = TSC2005_REG_PND0, + .wr_table = tsc2005_writable_table, + .use_single_rw = true, +}; + +struct tsc2005_data { + u16 x; + u16 y; + u16 z1; + u16 z2; +} __packed; +#define TSC2005_DATA_REGS 4 + struct tsc2005 { struct spi_device *spi; - - struct spi_message spi_read_msg; - struct tsc2005_spi_rd spi_x; - struct tsc2005_spi_rd spi_y; - struct tsc2005_spi_rd spi_z1; - struct tsc2005_spi_rd spi_z2; + struct regmap *regmap; struct input_dev*idev; charphys[32]; @@ -190,62 +208,6 @@ static int tsc2005_cmd(struct tsc2005 *ts, u8 cmd) return 0; } -static int tsc2005_write(struct tsc2005 *ts, u8 reg, u16 value) -{ - u32 tx = ((reg | TSC2005_REG_PND0) 16) | value; - struct spi_transfer xfer = { - .tx_buf = tx, - .len= 4, - .bits_per_word = 24, - }; - struct spi_message msg; - int error; - - spi_message_init(msg); - spi_message_add_tail(xfer, msg); - - error = spi_sync(ts-spi, msg); - if (error) { - dev_err(ts-spi-dev, - %s: failed, register: %x, value: %x, error: %d\n, - __func__, reg, value, error); - return error; - } - - return 0; -} - -static void tsc2005_setup_read(struct tsc2005_spi_rd *rd, u8 reg, bool last) -{ - memset(rd, 0, sizeof(*rd)); - - rd-spi_tx = (reg | TSC2005_REG_READ) 16; - rd-spi_xfer.tx_buf= rd-spi_tx; - rd-spi_xfer.rx_buf= rd-spi_rx; - rd-spi_xfer.len = 4; - rd-spi_xfer.bits_per_word = 24; - rd-spi_xfer.cs_change = !last; -} - -static int tsc2005_read(struct tsc2005 *ts, u8 reg, u16 *value) -{ - struct tsc2005_spi_rd spi_rd; - struct spi_message msg; - int error; - - tsc2005_setup_read(spi_rd, reg, true); - - spi_message_init(msg); - spi_message_add_tail(spi_rd.spi_xfer, msg); - - error = spi_sync(ts-spi, msg); - if (error) - return error; - - *value = spi_rd.spi_rx; - return 0; -} - static void tsc2005_update_pen_state(struct tsc2005 *ts, int x, int y, int pressure) { @@ -274,26 +236,23 @@ static irqreturn_t tsc2005_irq_thread(int irq, void *_ts) struct tsc2005 *ts = _ts; unsigned long flags; unsigned int pressure; - u32 x, y; - u32 z1, z2; + struct tsc2005_data tsdata; int error; /* read the coordinates */ - error = spi_sync(ts-spi, ts-spi_read_msg); + error = regmap_bulk_read(ts-regmap, TSC2005_REG_X, tsdata, +TSC2005_DATA_REGS); if (unlikely(error)) goto out; - x = ts-spi_x.spi_rx; - y = ts-spi_y.spi_rx; - z1 = ts-spi_z1.spi_rx
[PATCH 1/5] Input: tsc2005 - improve readability of register defines
Improve defines for first control byte by removing 0x00 prefix (the defines are for 8 bit values and not for 16 bit values) and expose register structure by exposing the shift. Signed-off-by: Sebastian Reichel s...@kernel.org --- drivers/input/touchscreen/tsc2005.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index d8c025b..87038b2 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c @@ -61,16 +61,24 @@ #define TSC2005_CMD_12BIT 0x04 /* control byte 0 */ -#define TSC2005_REG_READ 0x0001 -#define TSC2005_REG_PND0 0x0002 -#define TSC2005_REG_X 0x -#define TSC2005_REG_Y 0x0008 -#define TSC2005_REG_Z1 0x0010 -#define TSC2005_REG_Z2 0x0018 -#define TSC2005_REG_TEMP_HIGH 0x0050 -#define TSC2005_REG_CFR0 0x0060 -#define TSC2005_REG_CFR1 0x0068 -#define TSC2005_REG_CFR2 0x0070 +#define TSC2005_REG_READ 0x01 /* R/W access */ +#define TSC2005_REG_PND0 0x02 /* Power Not Down Control */ +#define TSC2005_REG_X (0x0 3) +#define TSC2005_REG_Y (0x1 3) +#define TSC2005_REG_Z1 (0x2 3) +#define TSC2005_REG_Z2 (0x3 3) +#define TSC2005_REG_AUX(0x4 3) +#define TSC2005_REG_TEMP1 (0x5 3) +#define TSC2005_REG_TEMP2 (0x6 3) +#define TSC2005_REG_STATUS (0x7 3) +#define TSC2005_REG_AUX_HIGH (0x8 3) +#define TSC2005_REG_AUX_LOW(0x9 3) +#define TSC2005_REG_TEMP_HIGH (0xA 3) +#define TSC2005_REG_TEMP_LOW (0xB 3) +#define TSC2005_REG_CFR0 (0xC 3) +#define TSC2005_REG_CFR1 (0xD 3) +#define TSC2005_REG_CFR2 (0xE 3) +#define TSC2005_REG_CONV_FUNC (0xF 3) /* configuration register 0 */ #define TSC2005_CFR0_PRECHARGE_276US 0x0040 -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: linux 4.2-rc1 broken Nokia N900
Hi, On Wed, Jul 22, 2015 at 09:27:32AM +0200, Pali Rohár wrote: diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index 5867384..f7d9ffd 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c @@ -245,6 +245,7 @@ static void omap2_mcspi_set_enable(const struct spi_device *spi, int enable) static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable) { + struct omap2_mcspi *mcspi = spi_master_get_devdata(spi-master); u32 l; /* The controller handles the inverted chip selects @@ -255,6 +256,8 @@ static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable) enable = !enable; if (spi-controller_state) { + pm_runtime_get_sync(mcspi-dev); + Should the return code should be checked here as with the other instances of pm_runtime_get_sync? Yes. If it fails, the line fetch error would be triggered again. Probably the set_cs callback should also be changed, so that it can return an error code. This is not something for 4.2-rc, though. Anyway, what do you think about adding gcc macro for pm_runtime_get_sync function which report compiler warning when return value is not checked? Adding __must_check to pm_runtime_get_sync() should be discussed separately with the relevant people in Cc. A quick grep in drivers/ reveals a huge amount of code not handling pm_runtime_get_sync's return code. -- Sebastian signature.asc Description: Digital signature
[PATCH] spi: omap2-mcspi: add runtime PM to set_cs()
Since commit ddcad7e9068eb omap2_mcspi_set_cs() is called without runtime power management requested. Thus the below kernel oops may be generated if a device is accessed after the runtime power management timeout. This patch fixes the problem by requesting runtime power management in omap2_mcspi_set_cs(). [ 13.933959] Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa09802c [ 13.940490] pgd = cfb38000 [ 13.946594] [fa09802c] *pgd=48011452(bad) [ 13.952758] Internal error: : 1028 [#1] PREEMPT ARM [ 13.958862] Modules linked in: tsc2005(+) omap_sham twl4030_wdt omap_wdt [ 13.965332] CPU: 0 PID: 183 Comm: modprobe Not tainted 4.2.0-rc1+ #363 [ 13.971801] Hardware name: Nokia RX-51 board [ 13.978302] task: cf572300 ti: cb1f2000 task.ti: cb1f2000 [ 13.984924] PC is at omap2_mcspi_set_cs+0x44/0x4c [ 13.991485] LR is at spi_set_cs+0x5c/0x60 [ 13.997985] pc : [c02bd3ac]lr : [c02baecc]psr: 2013 [ 13.997985] sp : cb1f3dd0 ip : 0001 fp : 0004 [ 14.011260] r10: cfce5be8 r9 : 0fff r8 : c0654f98 [ 14.017913] r7 : r6 : r5 : r4 : [ 14.024505] r3 : 200103dc r2 : fa098000 r1 : 0001 r0 : cf09bc00 [ 14.031036] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 14.037689] Control: 10c5387d Table: 8fb38019 DAC: 0015 [ 14.044403] Process modprobe (pid: 183, stack limit = 0xcb1f2210) [ 14.051300] Stack: (0xcb1f3dd0 to 0xcb1f4000) [ 14.058105] 3dc0: cf09bc00 c02bafa4 cf09bc00 cf09bc00 [ 14.065277] 3de0: bf013444 bf01254c cf0e2230 cf0e2230 0001 c0654f98 0fff 0fff [ 14.072570] 3e00: 0008 0002 0118 1f40 0031 cf09bc00 ffed bf013444 [ 14.080078] 3e20: 0031 c0654f98 cb1f2000 c02bb5c0 cf09bc00 [ 14.087738] 3e40: bf013454 c027a2f4 cf09bc00 bf013454 bf013454 c027a594 [ 14.095367] 3e60: cf09bc00 cf09bc34 c027a60c bf013454 cb1f3e80 c027a5ac c0278ec8 [ 14.102935] 3e80: cf972c4c cf09d630 bf013454 bf013454 cbb55300 c06848d8 c0279c84 [ 14.110473] 3ea0: bf01327c bf01327d bf013454 cb889180 c0654f98 c027b0c8 [ 14.117980] 3ec0: bf015000 cb889180 c00095b0 0040003e cfe6a080 0040003f [ 14.125457] 3ee0: 0008 cfcf9000 cb1f2000 6013 0040003e cbf1bbc0 0001 [ 14.132843] 3f00: bf0134cc cb1f2000 bf0134c0 cb1f3f58 c04352d0 cf801f00 00d0 [ 14.140136] 3f20: bf0134c0 bf0134c0 416c cb889040 0080 c000ebe4 cb1f2000 c0089f68 [ 14.147308] 3f40: bf0134c0 cbf1bc00 001a9193 416c 001f8d20 c008ab30 d0b1 416c [ 14.154571] 3f60: d0b1267c d0b1252b d0b13514 16c0 1ad0 [ 14.161865] 3f80: 001f 0020 0017 0014 0012 00201208 [ 14.169097] 3fa0: c000ea60 00201208 001f8d20 416c 001a9193 [ 14.176177] 3fc0: 00201208 0080 00208c20 001a9193 bee09e98 [ 14.183197] 3fe0: b6f742b4 bee09ae4 000153f0 93e4 6010 001f8d20 72757463 69665f65 [ 14.190277] [c02bd3ac] (omap2_mcspi_set_cs) from [c02baecc] (spi_set_cs+0x5c/0x60) [ 14.197479] [c02baecc] (spi_set_cs) from [c02bafa4] (spi_setup+0xd4/0x10c) [ 14.204833] [c02bafa4] (spi_setup) from [bf01254c] (tsc2005_probe+0x104/0x484 [tsc2005]) [ 14.212249] [bf01254c] (tsc2005_probe [tsc2005]) from [c02bb5c0] (spi_drv_probe+0x50/0x6c) [ 14.219818] [c02bb5c0] (spi_drv_probe) from [c027a2f4] (really_probe+0xd4/0x230) [ 14.227478] [c027a2f4] (really_probe) from [c027a594] (driver_probe_device+0x30/0x48) [ 14.235290] [c027a594] (driver_probe_device) from [c027a60c] (__driver_attach+0x60/0x84) [ 14.243286] [c027a60c] (__driver_attach) from [c0278ec8] (bus_for_each_dev+0x50/0x84) [ 14.251281] [c0278ec8] (bus_for_each_dev) from [c0279c84] (bus_add_driver+0xcc/0x1e0) [ 14.259246] [c0279c84] (bus_add_driver) from [c027b0c8] (driver_register+0x9c/0xe0) [ 14.267272] [c027b0c8] (driver_register) from [c00095b0] (do_one_initcall+0x100/0x1b0) [ 14.275421] [c00095b0] (do_one_initcall) from [c0089f68] (do_init_module+0x58/0x1bc) [ 14.283477] [c0089f68] (do_init_module) from [c008ab30] (SyS_init_module+0x54/0x64) [ 14.291412] [c008ab30] (SyS_init_module) from [c000ea60] (ret_fast_syscall+0x0/0x3c) [ 14.299407] Code: e5823018 e5902188 e5922000 e582302c (e592302c) [ 14.307403] ---[ end trace d21553dcaefcb5ac ]--- Reported-By: Pali Rohár pali.ro...@gmail.com Fixes: ddcad7e9068eb (spi: omap2-mcspi: Fix native cs with new set_cs) Tested-By: Pavel Machek pa...@ucw.cz Signed-off-by: Sebastian Reichel s...@kernel.org --- Hi Mark, Previous discussion about this patch happened in the following thread: https://lkml.org/lkml/2015/7/11/98 Michael also tested the patch, but have not explicitly written an Tested-By, so you may want to wait for feedback from him. The patch
[PATCH 0/3] Another Errata 430973 Update
Hi, This patchset is a followup to e748994 and a6d74678, that unconditionally enable the errata 430973 workaround for Cortex A8 CPUs. The first patch removes the CONFIG_ARM_ERRATA_430973 guard in the Nokia N900's IBE code, since all sold N900s are affected by the bug (AFAIK). The next two patches update the errata's Kconfig entry, so that it's no longer shown for multiplatform kernels and informs about the bootloader method. -- Sebastian Sebastian Reichel (3): ARM: OMAP2+: N900: always enable IBE bit ARM: update errata 430973 documentation ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig arch/arm/Kconfig | 5 + arch/arm/mach-omap2/board-rx51.c | 2 -- arch/arm/mach-omap2/pdata-quirks.c | 11 ++- arch/arm/mm/proc-v7.S | 2 +- 4 files changed, 8 insertions(+), 12 deletions(-) -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/3] ARM: OMAP2+: N900: always enable IBE bit
The kernel's workaround for Errata 430973 consists of a BTAC/BTB flush at context switch. This requires the IBE bit being set, which should normally be done by the bootloader. Since the Nokia N900's bootloader is not easily replaceable, a pdata quirk enables the IBE bit for the Nokia N900. Until e748994f5cc5, the flush at context switch required CONFIG_ARM_ERRATA_430973, so the same check has been used for setting the IBE bit. Since all sold N900s are assumed to be affected, the guard can be removed now, so that the IBE bit is always set. Signed-off-by: Sebastian Reichel s...@kernel.org --- arch/arm/mach-omap2/board-rx51.c | 2 -- arch/arm/mach-omap2/pdata-quirks.c | 11 ++- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index 2d1e5a6..3df01cc 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c @@ -108,11 +108,9 @@ static void __init rx51_init(void) rx51_peripherals_init(); if (omap_type() == OMAP2_DEVICE_TYPE_SEC) { -#ifdef CONFIG_ARM_ERRATA_430973 pr_info(RX-51: Enabling ARM errata 430973 workaround\n); /* set IBE to 1 */ rx51_secure_update_aux_cr(BIT(6), 0); -#endif } /* Ensure SDRC pins are mux'd for self-refresh */ diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 821171c..0aa438d 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -249,18 +249,11 @@ static void __init nokia_n900_legacy_init(void) hsmmc2_internal_input_clk(); if (omap_type() == OMAP2_DEVICE_TYPE_SEC) { - if (IS_ENABLED(CONFIG_ARM_ERRATA_430973)) { - pr_info(RX-51: Enabling ARM errata 430973 workaround\n); - /* set IBE to 1 */ - rx51_secure_update_aux_cr(BIT(6), 0); - } else { - pr_warn(RX-51: Not enabling ARM errata 430973 workaround\n); - pr_warn(Thumb binaries may crash randomly without this workaround\n); - } + pr_info(RX-51: Enabling ARM errata 430973 workaround\n); + rx51_secure_update_aux_cr(BIT(6), 0); /* set IBE to 1 */ pr_info(RX-51: Registring OMAP3 HWRNG device\n); platform_device_register(omap3_rom_rng_device); - } } -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/3] ARM: errata 430973: move !ARCH_MULTIPLATFORM to Kconfig
Having the !ARCH_MULTIPLATFORM dependency in the Kconfig file results in one option less to think about when configuring the kernel. Signed-off-by: Sebastian Reichel s...@kernel.org --- arch/arm/Kconfig | 1 + arch/arm/mm/proc-v7.S | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 0e4929b..f0e2d92 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1066,6 +1066,7 @@ config ARM_ERRATA_411920 config ARM_ERRATA_430973 bool ARM errata: Stale prediction on replaced interworking branch depends on CPU_V7 + depends on !ARCH_MULTIPLATFORM help This option enables the workaround for the 430973 Cortex-A8 r1p* erratum. If a code sequence containing an ARM/Thumb diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S index 0716bbe..494e844 100644 --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S @@ -294,7 +294,7 @@ __v7_ca17mp_setup: * r9: MIDR */ __ca8_errata: -#if defined(CONFIG_ARM_ERRATA_430973) !defined(CONFIG_ARCH_MULTIPLATFORM) +#ifdef CONFIG_ARM_ERRATA_430973 teq r3, #0x0010 @ only present in r1p* mrceq p15, 0, r0, c1, c0, 1 @ read aux control register orreq r0, r0, #(1 6) @ set IBE to 1 -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/3] ARM: update errata 430973 documentation
The Errata 430973 workaround config option only enables the IBE bit, which should be done by the bootloader if possible. Signed-off-by: Sebastian Reichel s...@kernel.org --- arch/arm/Kconfig | 4 1 file changed, 4 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1c50210..0e4929b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1078,6 +1078,10 @@ config ARM_ERRATA_430973 and also flushes the branch target cache at every context switch. Note that setting specific bits in the ACTLR register may not be available in non-secure mode. + Instead of enabling this option, it is recommended to enable the + workaround by setting the IBE bit from the bootloader, since the + BTB/BTAC operations are always executed for context switches on + Cortex-A8. config ARM_ERRATA_458693 bool ARM errata: Processor deadlock when a false hazard is created -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: linux 4.2-rc1 broken Nokia N900
Hi, On Tue, Jul 21, 2015 at 07:17:41PM -0500, Michael Welling wrote: On Tue, Jul 21, 2015 at 11:34:41AM +0200, Pavel Machek wrote: This code has my head spinning. I found that the errors do not occur when the driver is built into the kernel. I also found that with the patch below the errors go away. Not sure if it is acceptible but see if it fixes things on your side. diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index cf8b91b..3164d13 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1801,11 +1801,11 @@ int spi_setup(struct spi_device *spi) if (!spi-max_speed_hz) spi-max_speed_hz = spi-master-max_speed_hz; - spi_set_cs(spi, false); - if (spi-master-setup) status = spi-master-setup(spi); + spi_set_cs(spi, false); + dev_dbg(spi-dev, setup mode %d, %s%s%s%s%u bits/w, %u Hz max -- %d\n, (int) (spi-mode (SPI_CPOL | SPI_CPHA)), (spi-mode SPI_CS_HIGH) ? cs_high, : , mh. maybe a runtime PM issue? * external abort on non-linefetch: address cannot be accessed, since the module's clocks are disabled * built-in works, module not: built-in is probably a little bit faster (module must not be loaded from filesystem), so that the device has not yet been suspended * Before 4.2, omap2_mcspi_set_cs() was called in the setup routine, which acquired runtime PM * In 4.2, omap2_mcspi_set_cs() seems to be called without a prior pm_runtime_get_sync() * With your workaround, the device has not yet returned to suspend after the runtime PM acquisition in setup() So I suggest trying the following (compile tested only) patch: -- Sebastian diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index 5867384..f7d9ffd 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c @@ -245,6 +245,7 @@ static void omap2_mcspi_set_enable(const struct spi_device *spi, int enable) static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable) { + struct omap2_mcspi *mcspi = spi_master_get_devdata(spi-master); u32 l; /* The controller handles the inverted chip selects @@ -255,6 +256,8 @@ static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable) enable = !enable; if (spi-controller_state) { + pm_runtime_get_sync(mcspi-dev); + l = mcspi_cached_chconf0(spi); if (enable) @@ -263,6 +266,9 @@ static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable) l |= OMAP2_MCSPI_CHCONF_FORCE; mcspi_write_chconf0(spi, l); + + pm_runtime_mark_last_busy(mcspi-dev); + pm_runtime_put_autosuspend(mcspi-dev); } } signature.asc Description: Digital signature
Re: [PATCH] [TWL4030 MADC] Fix ADC[3:6] readings
Hi, To get a chance of this patch being considered for inclusion, you should send this to the maintainers of the phy and iio framework. There is a high chance, that none of them will see your mail. On Thu, Jul 16, 2015 at 03:20:27PM -0700, Adam YH Lee wrote: MADC[3:6] reads incorrect values without these two following changes: uhm MADC[3:6] are externally available analog inputs. Your change will result in them being tied to the USB module. - enable the 3v1 bias regulator for ADC[3:6] The regulator is not required for correct MADC functionality, but for correct USB measureing. The regulator should not be requested by the madc module, but by the usb module, which is connected to the madc. - configure ADC[3:6] lines as input, not as USB I don't think that should be done for all boards. [...] -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 0/2] Drop two more omap3 legacy board files for v4.3 merge window
Hi, On Thu, Jul 16, 2015 at 04:59:09AM -0700, Tony Lindgren wrote: I think we can drop these now. This just leaves n900 and ldp with n900 pending patches for legacy proc support. So I guess n900 board file removal depends on the atag procfs support in DT. What's the problem with ldp? Its DT file seem to cover everything in the board file. I guess both of them will finally be removed in 4.4? -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 4/4] Input: tsc2005 - convert to gpiod
On Wed, Jul 15, 2015 at 05:25:32PM -0700, Dmitry Torokhov wrote: On Thu, Jul 16, 2015 at 12:09:41AM +0200, Sebastian Reichel wrote: On Wed, Jul 15, 2015 at 02:34:04PM -0700, Dmitry Torokhov wrote: [...] if (np) { - ts-reset_gpio = of_get_named_gpio(np, reset-gpios, 0); - if (ts-reset_gpio == -EPROBE_DEFER) - return ts-reset_gpio; - if (ts-reset_gpio 0) { + ts-reset_gpio = devm_gpiod_get(spi-dev, reset, + GPIOD_OUT_HIGH); I think we should treat the gpio as optional and try to get the descriptor event on non-OF boards. As I wrote in the cover letter, I suggest to change this once the Nokia N900 board code has been removed. At that point changing the board code API is much easier, since it won't affect multiple trees. I do not see why it has be wait for Nokia board code. Just make it devm_gpiod_get_optional() and call it unconditionally and fall back onto custom reset function (if one is supplied). Right. I guess the same could be done for vio regulator. I will add this change in the next version of the patchset. -- Sebastian signature.asc Description: Digital signature
[PATCH 0/4] [input] tsc2005 cleanup
Hi, The following patches simplify and cleanup the tsc2005 touchscreen driver. Apart from making the driver more readable, the direct usage of SPI has been reduced to one function, so that tsc2004 support may be addable now (see [0]). The driver could be further simplified by making the vio regulator also mandatory for boardcode and switching boardcode from set_reset callback to GPIOD API. Since that would result in a patch touching the ARM and the input subsystem, I suggest to wait until the Nokia N900 boardcode is gone. [0] http://permalink.gmane.org/gmane.linux.kernel.input/37513 -- Sebastian Sebastian Reichel (4): Input: tsc2005 - improve readability of register defines Input: tsc2005 - convert to regmap Input: tsc2005 - simplify drvdata acquisition Input: tsc2005 - convert to gpiod drivers/input/touchscreen/tsc2005.c | 235 ++-- 1 file changed, 88 insertions(+), 147 deletions(-) -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/4] Input: tsc2005 - improve readability of register defines
Improve defines for first control byte by removing 0x00 prefix (the defines are for 8 bit values and not for 16 bit values) and expose register structure by exposing the shift. Signed-off-by: Sebastian Reichel s...@kernel.org --- drivers/input/touchscreen/tsc2005.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index d8c025b..87038b2 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c @@ -61,16 +61,24 @@ #define TSC2005_CMD_12BIT 0x04 /* control byte 0 */ -#define TSC2005_REG_READ 0x0001 -#define TSC2005_REG_PND0 0x0002 -#define TSC2005_REG_X 0x -#define TSC2005_REG_Y 0x0008 -#define TSC2005_REG_Z1 0x0010 -#define TSC2005_REG_Z2 0x0018 -#define TSC2005_REG_TEMP_HIGH 0x0050 -#define TSC2005_REG_CFR0 0x0060 -#define TSC2005_REG_CFR1 0x0068 -#define TSC2005_REG_CFR2 0x0070 +#define TSC2005_REG_READ 0x01 /* R/W access */ +#define TSC2005_REG_PND0 0x02 /* Power Not Down Control */ +#define TSC2005_REG_X (0x0 3) +#define TSC2005_REG_Y (0x1 3) +#define TSC2005_REG_Z1 (0x2 3) +#define TSC2005_REG_Z2 (0x3 3) +#define TSC2005_REG_AUX(0x4 3) +#define TSC2005_REG_TEMP1 (0x5 3) +#define TSC2005_REG_TEMP2 (0x6 3) +#define TSC2005_REG_STATUS (0x7 3) +#define TSC2005_REG_AUX_HIGH (0x8 3) +#define TSC2005_REG_AUX_LOW(0x9 3) +#define TSC2005_REG_TEMP_HIGH (0xA 3) +#define TSC2005_REG_TEMP_LOW (0xB 3) +#define TSC2005_REG_CFR0 (0xC 3) +#define TSC2005_REG_CFR1 (0xD 3) +#define TSC2005_REG_CFR2 (0xE 3) +#define TSC2005_REG_CONV_FUNC (0xF 3) /* configuration register 0 */ #define TSC2005_CFR0_PRECHARGE_276US 0x0040 -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/4] Input: tsc2005 - convert to regmap
Convert driver, so that it uses regmap instead of directly using spi_transfer for all register accesses. Signed-off-by: Sebastian Reichel s...@kernel.org --- drivers/input/touchscreen/tsc2005.c | 170 1 file changed, 58 insertions(+), 112 deletions(-) diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index 87038b2..0aec45a 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c @@ -34,6 +34,7 @@ #include linux/spi/spi.h #include linux/spi/tsc2005.h #include linux/regulator/consumer.h +#include linux/regmap.h /* * The touchscreen interface operates as follows: @@ -120,20 +121,36 @@ #define TSC2005_SPI_MAX_SPEED_HZ 1000 #define TSC2005_PENUP_TIME_MS 40 -struct tsc2005_spi_rd { - struct spi_transfer spi_xfer; - u32 spi_tx; - u32 spi_rx; +static const struct regmap_range tsc2005_writable_ranges[] = { + regmap_reg_range(TSC2005_REG_AUX_HIGH, TSC2005_REG_CFR2), }; +static const struct regmap_access_table tsc2005_writable_table = { + .yes_ranges = tsc2005_writable_ranges, + .n_yes_ranges = ARRAY_SIZE(tsc2005_writable_ranges), +}; + +static struct regmap_config tsc2005_regmap_config = { + .reg_bits = 8, + .val_bits = 16, + .reg_stride = 0x08, + .max_register = 0x78, + .read_flag_mask = TSC2005_REG_READ, + .wr_table = tsc2005_writable_table, + .use_single_rw = true, +}; + +struct tsc2005_data { + u16 x; + u16 y; + u16 z1; + u16 z2; +} __packed; +#define TSC2005_DATA_REGS 4 + struct tsc2005 { struct spi_device *spi; - - struct spi_message spi_read_msg; - struct tsc2005_spi_rd spi_x; - struct tsc2005_spi_rd spi_y; - struct tsc2005_spi_rd spi_z1; - struct tsc2005_spi_rd spi_z2; + struct regmap *regmap; struct input_dev*idev; charphys[32]; @@ -190,62 +207,6 @@ static int tsc2005_cmd(struct tsc2005 *ts, u8 cmd) return 0; } -static int tsc2005_write(struct tsc2005 *ts, u8 reg, u16 value) -{ - u32 tx = ((reg | TSC2005_REG_PND0) 16) | value; - struct spi_transfer xfer = { - .tx_buf = tx, - .len= 4, - .bits_per_word = 24, - }; - struct spi_message msg; - int error; - - spi_message_init(msg); - spi_message_add_tail(xfer, msg); - - error = spi_sync(ts-spi, msg); - if (error) { - dev_err(ts-spi-dev, - %s: failed, register: %x, value: %x, error: %d\n, - __func__, reg, value, error); - return error; - } - - return 0; -} - -static void tsc2005_setup_read(struct tsc2005_spi_rd *rd, u8 reg, bool last) -{ - memset(rd, 0, sizeof(*rd)); - - rd-spi_tx = (reg | TSC2005_REG_READ) 16; - rd-spi_xfer.tx_buf= rd-spi_tx; - rd-spi_xfer.rx_buf= rd-spi_rx; - rd-spi_xfer.len = 4; - rd-spi_xfer.bits_per_word = 24; - rd-spi_xfer.cs_change = !last; -} - -static int tsc2005_read(struct tsc2005 *ts, u8 reg, u16 *value) -{ - struct tsc2005_spi_rd spi_rd; - struct spi_message msg; - int error; - - tsc2005_setup_read(spi_rd, reg, true); - - spi_message_init(msg); - spi_message_add_tail(spi_rd.spi_xfer, msg); - - error = spi_sync(ts-spi, msg); - if (error) - return error; - - *value = spi_rd.spi_rx; - return 0; -} - static void tsc2005_update_pen_state(struct tsc2005 *ts, int x, int y, int pressure) { @@ -274,26 +235,23 @@ static irqreturn_t tsc2005_irq_thread(int irq, void *_ts) struct tsc2005 *ts = _ts; unsigned long flags; unsigned int pressure; - u32 x, y; - u32 z1, z2; + struct tsc2005_data tsdata; int error; /* read the coordinates */ - error = spi_sync(ts-spi, ts-spi_read_msg); + error = regmap_bulk_read(ts-regmap, TSC2005_REG_X, tsdata, +TSC2005_DATA_REGS); if (unlikely(error)) goto out; - x = ts-spi_x.spi_rx; - y = ts-spi_y.spi_rx; - z1 = ts-spi_z1.spi_rx; - z2 = ts-spi_z2.spi_rx; - /* validate position */ - if (unlikely(x MAX_12BIT || y MAX_12BIT)) + if (unlikely(tsdata.x MAX_12BIT || tsdata.y MAX_12BIT)) goto out; /* Skip reading if the pressure components are out of range */ - if (unlikely(z1 == 0 || z2 MAX_12BIT || z1 = z2)) + if (unlikely(tsdata.z1 == 0 || tsdata.z2 MAX_12BIT)) + goto out; + if (unlikely(tsdata.z1 = tsdata.z2)) goto out; /* @@ -301,8 +259,8 @@ static
[PATCH 4/4] Input: tsc2005 - convert to gpiod
Convert driver to descriptor based GPIO API. Also fix the after-probe reset GPIO state, so that the device is not kept in reset state. Signed-off-by: Sebastian Reichel s...@kernel.org --- drivers/input/touchscreen/tsc2005.c | 25 - 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index 83508d8..cb08dc8 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c @@ -30,11 +30,11 @@ #include linux/delay.h #include linux/pm.h #include linux/of.h -#include linux/of_gpio.h #include linux/spi/spi.h #include linux/spi/tsc2005.h #include linux/regulator/consumer.h #include linux/regmap.h +#include linux/gpio/consumer.h /* * The touchscreen interface operates as follows: @@ -179,7 +179,7 @@ struct tsc2005 { struct regulator*vio; - int reset_gpio; + struct gpio_desc*reset_gpio; void(*set_reset)(bool enable); }; @@ -317,8 +317,8 @@ static void tsc2005_stop_scan(struct tsc2005 *ts) static void tsc2005_set_reset(struct tsc2005 *ts, bool enable) { - if (ts-reset_gpio = 0) - gpio_set_value(ts-reset_gpio, enable); + if (ts-reset_gpio) + gpiod_set_value_cansleep(ts-reset_gpio, enable); else if (ts-set_reset) ts-set_reset(enable); } @@ -611,19 +611,11 @@ static int tsc2005_probe(struct spi_device *spi) ts-esd_timeout = esd_timeout; if (np) { - ts-reset_gpio = of_get_named_gpio(np, reset-gpios, 0); - if (ts-reset_gpio == -EPROBE_DEFER) - return ts-reset_gpio; - if (ts-reset_gpio 0) { + ts-reset_gpio = devm_gpiod_get(spi-dev, reset, + GPIOD_OUT_HIGH); + if (IS_ERR(ts-reset_gpio)) { + error = PTR_ERR(ts-reset_gpio); dev_err(spi-dev, error acquiring reset gpio: %d\n, - ts-reset_gpio); - return ts-reset_gpio; - } - - error = devm_gpio_request_one(spi-dev, ts-reset_gpio, 0, - reset-gpios); - if (error) { - dev_err(spi-dev, error requesting reset gpio: %d\n, error); return error; } @@ -635,7 +627,6 @@ static int tsc2005_probe(struct spi_device *spi) return error; } } else { - ts-reset_gpio = -1; ts-set_reset = pdata-set_reset; } -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/4] Input: tsc2005 - convert to regmap
Hi Dmitry, On Wed, Jul 15, 2015 at 02:29:55PM -0700, Dmitry Torokhov wrote: I also got: CC [M] drivers/input/touchscreen/tsc2005.o Building modules, stage 2. Kernel: arch/x86/boot/bzImage is ready (#1383) MODPOST 1403 modules ERROR: devm_regmap_init_spi [drivers/input/touchscreen/tsc2005.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 I guess we need select REGMAP_SPI. Right. I will add this in PATCHv2. -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 3/4] Input: tsc2005 - simplify drvdata acquisition
Hi, On Wed, Jul 15, 2015 at 02:31:07PM -0700, Dmitry Torokhov wrote: On Wed, Jul 15, 2015 at 02:13:27PM +0200, Sebastian Reichel wrote: Do not convert device to spi_device just for getting the driver data, since spi_get_drvdata() just calls dev_get_drvdata(). Even though at the moment they all share the same data I consider them logically different and so would prefer not to substityte one for another. I guess your problem is with mixing spi_*_drvdata and dev_*_drvdata calls? In that case I will also change spi_set_drvdata to dev_set_drvdata, so that spi_*_drvdata is not used at all. This will still reduce lines of code and flatten the way for tsc2004 support (which is i2c based). -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 4/4] Input: tsc2005 - convert to gpiod
Hi, On Wed, Jul 15, 2015 at 02:34:04PM -0700, Dmitry Torokhov wrote: [...] if (np) { - ts-reset_gpio = of_get_named_gpio(np, reset-gpios, 0); - if (ts-reset_gpio == -EPROBE_DEFER) - return ts-reset_gpio; - if (ts-reset_gpio 0) { + ts-reset_gpio = devm_gpiod_get(spi-dev, reset, + GPIOD_OUT_HIGH); I think we should treat the gpio as optional and try to get the descriptor event on non-OF boards. As I wrote in the cover letter, I suggest to change this once the Nokia N900 board code has been removed. At that point changing the board code API is much easier, since it won't affect multiple trees. [...] -- Sebastian signature.asc Description: Digital signature
[PATCH 3/4] Input: tsc2005 - simplify drvdata acquisition
Do not convert device to spi_device just for getting the driver data, since spi_get_drvdata() just calls dev_get_drvdata(). Signed-off-by: Sebastian Reichel s...@kernel.org --- drivers/input/touchscreen/tsc2005.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index 0aec45a..83508d8 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c @@ -354,8 +354,7 @@ static ssize_t tsc2005_selftest_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct spi_device *spi = to_spi_device(dev); - struct tsc2005 *ts = spi_get_drvdata(spi); + struct tsc2005 *ts = dev_get_drvdata(dev); unsigned int temp_high; unsigned int temp_high_orig; unsigned int temp_high_test; @@ -440,8 +439,7 @@ static umode_t tsc2005_attr_is_visible(struct kobject *kobj, struct attribute *attr, int n) { struct device *dev = container_of(kobj, struct device, kobj); - struct spi_device *spi = to_spi_device(dev); - struct tsc2005 *ts = spi_get_drvdata(spi); + struct tsc2005 *ts = dev_get_drvdata(dev); umode_t mode = attr-mode; if (attr == dev_attr_selftest.attr) { @@ -729,8 +727,7 @@ static int tsc2005_remove(struct spi_device *spi) static int __maybe_unused tsc2005_suspend(struct device *dev) { - struct spi_device *spi = to_spi_device(dev); - struct tsc2005 *ts = spi_get_drvdata(spi); + struct tsc2005 *ts = dev_get_drvdata(dev); mutex_lock(ts-mutex); @@ -746,8 +743,7 @@ static int __maybe_unused tsc2005_suspend(struct device *dev) static int __maybe_unused tsc2005_resume(struct device *dev) { - struct spi_device *spi = to_spi_device(dev); - struct tsc2005 *ts = spi_get_drvdata(spi); + struct tsc2005 *ts = dev_get_drvdata(dev); mutex_lock(ts-mutex); -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: linux 4.2-rc1 broken Nokia N900
Hi, On Mon, Jul 13, 2015 at 06:05:47PM +0200, Pali Rohár wrote: now I'm testing 4.2-rc2 release and rtc is working: [ 27.426055] omap_i2c 48072000.i2c: controller timed out [ 28.723358] twl_rtc 4807.i2c:twl@48:rtc: Power up reset detected. [ 30.127014] twl_rtc 4807.i2c:twl@48:rtc: Enabling TWL-RTC [ 31.373626] twl_rtc 4807.i2c:twl@48:rtc: rtc core: registered 4807.i2c:twl@48 as rtc0 There is still some i2c time out line and some reset detected, but driver loads fine. But problem with touchscreen tsc2005 and wifi wl1251 is still there :-( Drivers are compiled as external .ko modules. Right, my kernel was with everything built-in. Plus I see new problem with bq2415_charger :-( Mh did you see them in 4.1? [ 54.214965] isp1704_charger isp1704: registered with product id isp1707 [ 54.828674] bq2415x-charger 2-006b: automode enabled [ 55.192596] [ cut here ] [ 55.200561] WARNING: CPU: 0 PID: 528 at kernel/workqueue.c:1443 __queue_delayed_work+0x50/0x144() ... [ 55.489501] WARNING: CPU: 0 PID: 528 at kernel/workqueue.c:1445 __queue_delayed_work+0xb4/0x144() ... [ 55.820953] WARNING: CPU: 0 PID: 528 at kernel/workqueue.c:1376 __queue_work+0x2c0/0x404() ... [ 56.243347] bq2415x-charger 2-006b: driver registered So the driver tries to send a notification before it's fully registered. The warnings are probably a side-effect of the power-supply API changes in 4.1. [ 77.142181] INFO: rcu_preempt detected stalls on CPUs/tasks: { P528} (detected by 0, t=2102 jiffies, g=1101, c=1100, q=3834) [ 77.163391] kworker/0:3 R running 0 528 2 0x [ 77.173706] Workqueue: events power_supply_changed_work [ 77.183898] [c042883c] (__schedule) from [c0428c94] (preempt_schedule_irq+0x54/0x84) [ 77.194274] [c0428c94] (preempt_schedule_irq) from [c042c23c] (svc_preempt+0x8/0x18) [ 77.204711] [c042c23c] (svc_preempt) from [c0047ce4] (queue_delayed_work_on+0x40/0x44) [ 77.215179] [c0047ce4] (queue_delayed_work_on) from [bf0a59e4] (bq2415x_notifier_call+0x90/0x9c [bq2415x_charger]) [ 77.235870] [bf0a59e4] (bq2415x_notifier_call [bq2415x_charger]) from [c004de34] (notifier_call_chain+0x38/0x68) [ 77.257019] [c004de34] (notifier_call_chain) from [c004dff4] (__atomic_notifier_call_chain+0x34/0x44) [ 77.278411] [c004dff4] (__atomic_notifier_call_chain) from [c004e018] (atomic_notifier_call_chain+0x14/0x18) [ 77.299804] [c004e018] (atomic_notifier_call_chain) from [c0305a9c] (power_supply_changed_work+0xac/0x130) [ 77.321197] [c0305a9c] (power_supply_changed_work) from [c00484d8] (process_one_work+0x278/0x45c) [ 77.342529] [c00484d8] (process_one_work) from [c0048918] (worker_thread+0x230/0x354) [ 77.353393] [c0048918] (worker_thread) from [c004d0e0] (kthread+0xcc/0xe0) [ 77.364074] [c004d0e0] (kthread) from [c000eb08] (ret_from_fork+0x14/0x2c) [ 77.374572] kworker/0:3 R running 0 528 2 0x [ 77.384948] Workqueue: events power_supply_changed_work [ 77.395111] [c042883c] (__schedule) from [c0428c94] (preempt_schedule_irq+0x54/0x84) [ 77.405456] [c0428c94] (preempt_schedule_irq) from [c042c23c] (svc_preempt+0x8/0x18) [ 77.415863] [c042c23c] (svc_preempt) from [c0047ce4] (queue_delayed_work_on+0x40/0x44) [ 77.426269] [c0047ce4] (queue_delayed_work_on) from [bf0a59e4] (bq2415x_notifier_call+0x90/0x9c [bq2415x_charger]) [ 77.447174] [bf0a59e4] (bq2415x_notifier_call [bq2415x_charger]) from [c004de34] (notifier_call_chain+0x38/0x68) [ 77.468322] [c004de34] (notifier_call_chain) from [c004dff4] (__atomic_notifier_call_chain+0x34/0x44) [ 77.489990] [c004dff4] (__atomic_notifier_call_chain) from [c004e018] (atomic_notifier_call_chain+0x14/0x18) [ 77.512115] [c004e018] (atomic_notifier_call_chain) from [c0305a9c] (power_supply_changed_work+0xac/0x130) [ 77.534637] [c0305a9c] (power_supply_changed_work) from [c00484d8] (process_one_work+0x278/0x45c) [ 77.557189] [c00484d8] (process_one_work) from [c0048918] (worker_thread+0x230/0x354) [ 77.568634] [c0048918] (worker_thread) from [c004d0e0] (kthread+0xcc/0xe0) [ 77.579925] [c004d0e0] (kthread) from [c000eb08] (ret_from_fork+0x14/0x2c) Not sure about these. -- Sebastian signature.asc Description: Digital signature
Re: linux 4.2-rc1 broken Nokia N900
Hi, On Sat, Jul 11, 2015 at 02:05:05PM +0200, Pali Rohár wrote: now I tested 4.2-rc1 release on Nokia N900 and couple of drivers are broken and cause kernel oops... Basically wifi, touchscreen and rtc drivers not working... I just tried 4.2-rc2 and I can't see any of the problems you have: [2.473968] twl_rtc 4807.i2c:twl@48:rtc: Power up reset detected. [2.481170] twl_rtc 4807.i2c:twl@48:rtc: Enabling TWL-RTC [2.492095] twl_rtc 4807.i2c:twl@48:rtc: rtc core: registered 4807.i2c:twl@48 as rtc0 ... [3.017028] wl1251: loaded [3.022430] wl1251: initialized ... [3.065490] input: TSC2005 touchscreen as /devices/platform/6800.ocp/48098000.spi/spi_master/spi1/spi1.0/input/input5 ... The only thing I noticed is, that the display is not working. For some reason it is not enabled: root@n900:/sys/class/drm/card0-Unknown-2# cat status connected root@n900:/sys/class/drm/card0-Unknown-2# cat modes 800x480 root@n900:/sys/class/drm/card0-Unknown-2# cat enabled disabled -- Sebastian signature.asc Description: Digital signature
Re: linux 4.2-rc1 broken Nokia N900
[+cc Michael Welling mwell...@ieee.org, author of all omap-spi patches between 4.1 and 4.2-rc1] Hi, On Sun, Jul 12, 2015 at 11:44:25PM -0700, Tony Lindgren wrote: * Pali Rohár pali.ro...@gmail.com [150711 05:07]: Hello, now I tested 4.2-rc1 release on Nokia N900 and couple of drivers are broken and cause kernel oops... Basically wifi, touchscreen and rtc drivers not working... Here are some relevant snippets form dmesg: [ 13.933959] Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa09802c [ 13.940490] pgd = cfb38000 [ 13.946594] [fa09802c] *pgd=48011452(bad) [ 13.952758] Internal error: : 1028 [#1] PREEMPT ARM [ 13.958862] Modules linked in: tsc2005(+) omap_sham twl4030_wdt omap_wdt [ 13.965332] CPU: 0 PID: 183 Comm: modprobe Not tainted 4.2.0-rc1+ #363 [ 13.971801] Hardware name: Nokia RX-51 board [ 13.978302] task: cf572300 ti: cb1f2000 task.ti: cb1f2000 [ 13.984924] PC is at omap2_mcspi_set_cs+0x44/0x4c [ 13.991485] LR is at spi_set_cs+0x5c/0x60 [ 13.997985] pc : [c02bd3ac]lr : [c02baecc]psr: 2013 [ 13.997985] sp : cb1f3dd0 ip : 0001 fp : 0004 [ 14.011260] r10: cfce5be8 r9 : 0fff r8 : c0654f98 [ 14.017913] r7 : r6 : r5 : r4 : [ 14.024505] r3 : 200103dc r2 : fa098000 r1 : 0001 r0 : cf09bc00 [ 14.031036] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user [ 14.037689] Control: 10c5387d Table: 8fb38019 DAC: 0015 [ 14.044403] Process modprobe (pid: 183, stack limit = 0xcb1f2210) [ 14.051300] Stack: (0xcb1f3dd0 to 0xcb1f4000) [ 14.058105] 3dc0: cf09bc00 c02bafa4 cf09bc00 cf09bc00 [ 14.065277] 3de0: bf013444 bf01254c cf0e2230 cf0e2230 0001 c0654f98 0fff 0fff [ 14.072570] 3e00: 0008 0002 0118 1f40 0031 cf09bc00 ffed bf013444 [ 14.080078] 3e20: 0031 c0654f98 cb1f2000 c02bb5c0 cf09bc00 [ 14.087738] 3e40: bf013454 c027a2f4 cf09bc00 bf013454 bf013454 c027a594 [ 14.095367] 3e60: cf09bc00 cf09bc34 c027a60c bf013454 cb1f3e80 c027a5ac c0278ec8 [ 14.102935] 3e80: cf972c4c cf09d630 bf013454 bf013454 cbb55300 c06848d8 c0279c84 [ 14.110473] 3ea0: bf01327c bf01327d bf013454 cb889180 c0654f98 c027b0c8 [ 14.117980] 3ec0: bf015000 cb889180 c00095b0 0040003e cfe6a080 0040003f [ 14.125457] 3ee0: 0008 cfcf9000 cb1f2000 6013 0040003e cbf1bbc0 0001 [ 14.132843] 3f00: bf0134cc cb1f2000 bf0134c0 cb1f3f58 c04352d0 cf801f00 00d0 [ 14.140136] 3f20: bf0134c0 bf0134c0 416c cb889040 0080 c000ebe4 cb1f2000 c0089f68 [ 14.147308] 3f40: bf0134c0 cbf1bc00 001a9193 416c 001f8d20 c008ab30 d0b1 416c [ 14.154571] 3f60: d0b1267c d0b1252b d0b13514 16c0 1ad0 [ 14.161865] 3f80: 001f 0020 0017 0014 0012 00201208 [ 14.169097] 3fa0: c000ea60 00201208 001f8d20 416c 001a9193 [ 14.176177] 3fc0: 00201208 0080 00208c20 001a9193 bee09e98 [ 14.183197] 3fe0: b6f742b4 bee09ae4 000153f0 93e4 6010 001f8d20 72757463 69665f65 [ 14.190277] [c02bd3ac] (omap2_mcspi_set_cs) from [c02baecc] (spi_set_cs+0x5c/0x60) [ 14.197479] [c02baecc] (spi_set_cs) from [c02bafa4] (spi_setup+0xd4/0x10c) [ 14.204833] [c02bafa4] (spi_setup) from [bf01254c] (tsc2005_probe+0x104/0x484 [tsc2005]) [ 14.212249] [bf01254c] (tsc2005_probe [tsc2005]) from [c02bb5c0] (spi_drv_probe+0x50/0x6c) [ 14.219818] [c02bb5c0] (spi_drv_probe) from [c027a2f4] (really_probe+0xd4/0x230) [ 14.227478] [c027a2f4] (really_probe) from [c027a594] (driver_probe_device+0x30/0x48) [ 14.235290] [c027a594] (driver_probe_device) from [c027a60c] (__driver_attach+0x60/0x84) [ 14.243286] [c027a60c] (__driver_attach) from [c0278ec8] (bus_for_each_dev+0x50/0x84) [ 14.251281] [c0278ec8] (bus_for_each_dev) from [c0279c84] (bus_add_driver+0xcc/0x1e0) [ 14.259246] [c0279c84] (bus_add_driver) from [c027b0c8] (driver_register+0x9c/0xe0) [ 14.267272] [c027b0c8] (driver_register) from [c00095b0] (do_one_initcall+0x100/0x1b0) [ 14.275421] [c00095b0] (do_one_initcall) from [c0089f68] (do_init_module+0x58/0x1bc) [ 14.283477] [c0089f68] (do_init_module) from [c008ab30] (SyS_init_module+0x54/0x64) [ 14.291412] [c008ab30] (SyS_init_module) from [c000ea60] (ret_fast_syscall+0x0/0x3c) [ 14.299407] Code: e5823018 e5902188 e5922000 e582302c (e592302c) [ 14.307403] ---[ end trace d21553dcaefcb5ac ]--- That seems to be a regression with the SPI driver. Care to git bisect it? It's probably one of the following commits: $ git log
Re: rx51-battery.ko incompatiblity: board code vs DT
Hi, On Mon, Jul 06, 2015 at 09:44:22PM +0200, Pali Rohár wrote: now I found out that rx51-battery.ko driver register sysnode /sys/class/power_supply/rx51-battery/ when booting with legacy board code. But when booting DT kernel it register sysnode with different name /sys/class/power_supply/n900-battery/ Sysfs node for DT kernel comes from Nokia N900 DTS file: arch/arm/boot/dts/omap3-n900.dts I would propose change which change DTS to rx51-battery to have it compatible with naming which is for legacy board code. It is just because to have compatibility and same naming scheme and also to make existing programs to work without needing patching them. What do you think? Change the driver instead (in rx51_battery_probe): - di-bat.name = dev_name(pdev-dev); + di-bat.name = rx51-battery This will keep the DT ABI stable and avoid introducing the term rx51 in the device tree file. -- Sebastian signature.asc Description: Digital signature
[PATCH] Input: of_touchscreen - remove interdependence of max/fuzz values
Commit 3eea8b5d68c8 introduced a dependency between touchscreen-max-* and touchscreen-fuzz-*, so that either both must be specified or none of them. If only one of them is specified the other value will be reset to 0. This commit restores the previous behaviour, that the drivers default value will be used for the unspecified value. Reported-By: Pavel Machek pa...@ucw.cz Fixes: 3eea8b5d68c8 (Input: of_touchscreen - rework the DT parsing function) Signed-off-by: Sebastian Reichel s...@kernel.org --- drivers/input/touchscreen/of_touchscreen.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/input/touchscreen/of_touchscreen.c b/drivers/input/touchscreen/of_touchscreen.c index b82b520..7d2cf59 100644 --- a/drivers/input/touchscreen/of_touchscreen.c +++ b/drivers/input/touchscreen/of_touchscreen.c @@ -42,8 +42,11 @@ static void touchscreen_set_params(struct input_dev *dev, } absinfo = dev-absinfo[axis]; - absinfo-maximum = max; - absinfo-fuzz = fuzz; + + if (max) + absinfo-maximum = max; + if (fuzz) + absinfo-fuzz = fuzz; } /** @@ -65,23 +68,17 @@ void touchscreen_parse_of_params(struct input_dev *dev) maximum = of_get_optional_u32(np, touchscreen-size-x); fuzz = of_get_optional_u32(np, touchscreen-fuzz-x); - if (maximum || fuzz) { - touchscreen_set_params(dev, ABS_X, maximum, fuzz); - touchscreen_set_params(dev, ABS_MT_POSITION_X, maximum, fuzz); - } + touchscreen_set_params(dev, ABS_X, maximum, fuzz); + touchscreen_set_params(dev, ABS_MT_POSITION_X, maximum, fuzz); maximum = of_get_optional_u32(np, touchscreen-size-y); fuzz = of_get_optional_u32(np, touchscreen-fuzz-y); - if (maximum || fuzz) { - touchscreen_set_params(dev, ABS_Y, maximum, fuzz); - touchscreen_set_params(dev, ABS_MT_POSITION_Y, maximum, fuzz); - } + touchscreen_set_params(dev, ABS_Y, maximum, fuzz); + touchscreen_set_params(dev, ABS_MT_POSITION_Y, maximum, fuzz); maximum = of_get_optional_u32(np, touchscreen-max-pressure); fuzz = of_get_optional_u32(np, touchscreen-fuzz-pressure); - if (maximum || fuzz) { - touchscreen_set_params(dev, ABS_PRESSURE, maximum, fuzz); - touchscreen_set_params(dev, ABS_MT_PRESSURE, maximum, fuzz); - } + touchscreen_set_params(dev, ABS_PRESSURE, maximum, fuzz); + touchscreen_set_params(dev, ABS_MT_PRESSURE, maximum, fuzz); } EXPORT_SYMBOL(touchscreen_parse_of_params); -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] fix n900 dts file to work around 4.1 touchscreen regression on n900
Hi, On Fri, May 29, 2015 at 09:32:11PM +0200, Pavel Machek wrote: Fix dts to match what the Linux kernel expects. This works around touchscreen problems in 4.1 linux on Nokia n900. Signed-off-by: Pavel Machek pa...@ucw.cz diff --git a/Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt b/Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt index 4b641c7..09089a6 100644 --- a/Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt +++ b/Documentation/devicetree/bindings/input/touchscreen/tsc2005.txt @@ -32,8 +32,8 @@ Example: touchscreen-fuzz-x = 4; touchscreen-fuzz-y = 7; touchscreen-fuzz-pressure = 2; - touchscreen-max-x = 4096; - touchscreen-max-y = 4096; + touchscreen-size-x = 4096; + touchscreen-size-y = 4096; touchscreen-max-pressure = 2048; ti,x-plate-ohms = 280; diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index 5c16145..5f5e0f3 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts @@ -832,8 +832,8 @@ touchscreen-fuzz-x = 4; touchscreen-fuzz-y = 7; touchscreen-fuzz-pressure = 2; - touchscreen-max-x = 4096; - touchscreen-max-y = 4096; + touchscreen-size-x = 4096; + touchscreen-size-y = 4096; touchscreen-max-pressure = 2048; ti,x-plate-ohms = 280; Acked-By: Sebastian Reichel s...@kernel.org max-x/fuzz-x is a leftover from development of the generic bindings (Initially I used min and max). If 3eea8b5d68c801fec788b411582b803463834752's behaviour should become the new behaviour it should be documented, that maximum and fuzz values are dependent on each other. Instead I suggest to restore the old behaviour. -- Sebastian signature.asc Description: Digital signature
Re: [PATCHv2 4/4] DTS: ARM: OMAP3-N900: Add lis3lv02d support
Hi, On Wed, May 20, 2015 at 10:21:22AM -0700, Tony Lindgren wrote: * Sebastian Reichel s...@kernel.org [150514 15:41]: On Fri, Mar 27, 2015 at 03:39:46PM +0100, Sebastian Reichel wrote: This adds support for the N900's accelerometer to the Nokia N900 DTS file. Signed-off-by: Sebastian Reichel s...@kernel.org Acked-by: Tony Lindgren t...@atomide.com --- Quote from Tony: This at least currently does not conflict with anything I have queued, so I suggest you try to get Greg to take the whole set: http://article.gmane.org/gmane.linux.ports.arm.omap/125020 It seems Greg did not see this message (this patch did not make it into 4.1-rc and the driver changes did), so could you queue this patch for 4.2? Hmm seems to be there as commit 1ac4e6fee41d6. uhm right, my mistake. No clue how I missed it (especially since it's the last change in the n900 dts file). Sorry for the noise. -- Sebastian signature.asc Description: Digital signature
Re: ARM errata 430973 on multi platform kernels
On Thu, Apr 16, 2015 at 09:08:58AM -0700, Tony Lindgren wrote: * Sebastian Reichel s...@kernel.org [150415 09:32]: Hi, On Thu, Apr 09, 2015 at 02:48:43PM +0100, Russell King - ARM Linux wrote: On Thu, Apr 09, 2015 at 12:06:58AM +0100, Russell King - ARM Linux wrote: On Tue, Apr 07, 2015 at 08:22:08AM -0700, Tony Lindgren wrote: Works for me. The above needs the following fix folded in to build: --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S @@ -532,7 +532,7 @@ __v7_ca9mp_proc_info: __v7_ca8_proc_info: .long 0x410fc080 .long 0xff00 - __v7_proc __v7_ca8mp_proc_info, proc_fns = ca8_processor_functions + __v7_proc __v7_ca8_proc_info, __v7_setup, proc_fns = ca8_processor_functions .size __v7_ca8_proc_info, . - __v7_ca8_proc_info #endif /* CONFIG_ARM_LPAE */ Thanks, merged into the original patch. Do you want to give me an ack for this, thanks? I tried to test this together with Tony's follow up patch, but I get this after applying the patch to v4.0: sre@earth ~/src/linux [430973-fix] % make -j4 CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h make[1]: 'include/generated/mach-types.h' is up to date. CALLscripts/checksyscalls.sh CHK include/generated/compile.h AS arch/arm/mm/proc-v7.o arch/arm/mm/proc-v7.S: Assembler messages: arch/arm/mm/proc-v7.S:535: Error: invalid operands (*ABS* and .text sections) for `|' arch/arm/mm/proc-v7.S:535: Error: invalid operands (*ABS* and .text sections) for `|' scripts/Makefile.build:294: recipe for target 'arch/arm/mm/proc-v7.o' failed make[1]: *** [arch/arm/mm/proc-v7.o] Error 1 Makefile:947: recipe for target 'arch/arm/mm' failed make: *** [arch/arm/mm] Error 2 make: *** Waiting for unfinished jobs Maybe test the version in Linux next: a6d746789825 (ARM: proc-v7: avoid errata 430973 workaround for non-Cortex A8 CPUs) DONE with your your patch added on top: Tested-By: Sebastian Reichel s...@kernel.org (on N900) I guess we should also drop the CONFIG_ARM_ERRATA_430973 check from pdata-quirks' nokia_n900_legacy_init() and just enable it unconditionally. -- Sebastian signature.asc Description: Digital signature
Re: ARM errata 430973 on multi platform kernels
Hi, On Thu, Apr 09, 2015 at 02:48:43PM +0100, Russell King - ARM Linux wrote: On Thu, Apr 09, 2015 at 12:06:58AM +0100, Russell King - ARM Linux wrote: On Tue, Apr 07, 2015 at 08:22:08AM -0700, Tony Lindgren wrote: Works for me. The above needs the following fix folded in to build: --- a/arch/arm/mm/proc-v7.S +++ b/arch/arm/mm/proc-v7.S @@ -532,7 +532,7 @@ __v7_ca9mp_proc_info: __v7_ca8_proc_info: .long 0x410fc080 .long 0xff00 - __v7_proc __v7_ca8mp_proc_info, proc_fns = ca8_processor_functions + __v7_proc __v7_ca8_proc_info, __v7_setup, proc_fns = ca8_processor_functions .size __v7_ca8_proc_info, . - __v7_ca8_proc_info #endif /* CONFIG_ARM_LPAE */ Thanks, merged into the original patch. Do you want to give me an ack for this, thanks? I tried to test this together with Tony's follow up patch, but I get this after applying the patch to v4.0: sre@earth ~/src/linux [430973-fix] % make -j4 CHK include/config/kernel.release CHK include/generated/uapi/linux/version.h CHK include/generated/utsrelease.h make[1]: 'include/generated/mach-types.h' is up to date. CALLscripts/checksyscalls.sh CHK include/generated/compile.h AS arch/arm/mm/proc-v7.o arch/arm/mm/proc-v7.S: Assembler messages: arch/arm/mm/proc-v7.S:535: Error: invalid operands (*ABS* and .text sections) for `|' arch/arm/mm/proc-v7.S:535: Error: invalid operands (*ABS* and .text sections) for `|' scripts/Makefile.build:294: recipe for target 'arch/arm/mm/proc-v7.o' failed make[1]: *** [arch/arm/mm/proc-v7.o] Error 1 Makefile:947: recipe for target 'arch/arm/mm' failed make: *** [arch/arm/mm] Error 2 make: *** Waiting for unfinished jobs -- Sebastian signature.asc Description: Digital signature
Re: [PATCHv7] media: i2c/adp1653: Devicetree support for adp1653
Hi, On Thu, Apr 09, 2015 at 09:42:38AM +0200, Pavel Machek wrote: [...] +#include linux/of_gpio.h +#include linux/gpio.h [...] This should probably be #include linux/of.h #include linux/gpio/consumer.h -- Sebastian signature.asc Description: Digital signature
Re: [PATCHv7] media: i2c/adp1653: Devicetree support for adp1653
On Thu, Apr 09, 2015 at 01:29:43PM +0200, Pavel Machek wrote: On Thu 2015-04-09 11:10:17, Sebastian Reichel wrote: On Thu, Apr 09, 2015 at 09:42:38AM +0200, Pavel Machek wrote: [...] +#include linux/of_gpio.h +#include linux/gpio.h [...] This should probably be #include linux/of.h #include linux/gpio/consumer.h And I thought people would only bikesched paint on the Documentation. Sakari, feel free to change that, but a) I don't see why Sebastian's version is better You neither use linux/of_gpio.h nor linux/gpio.h. Well include/linux/gpio.h describes the old gpio API. The new gpiod gpiod API is described in include/linux/gpio/consumer.h and you use it, so the include should be included ;) You don't use anything from include/linux/of_gpio.h, but it includes include/linux/of.h, which you are using. So you should include linux/of.h instead ;) b) am pretty sure there is about infinite number of possibilities there. Yes, but most are wrong. You should include all headers, that are used by you - nothing more and nothing less. -- Sebastian signature.asc Description: Digital signature
Re: [PATCH v4 1/6] power: twl4030-madc-battery: Convert to iio consumer.
Hi, On Tue, Mar 10, 2015 at 10:27:22PM +0100, Marek Belisko wrote: Because of added iio error handling private data allocation was converted to managed to simplify code. Thanks, pulled (only PATCH 1/6 for now). -- Sebastian signature.asc Description: Digital signature
Re: [PATCH v4 6/6] power: twl4030_madc_battery: Add missing MODULE_ALIAS
Hi, On Tue, Mar 10, 2015 at 10:27:27PM +0100, Marek Belisko wrote: Without MODULE_ALIAS twl4030_madc_battery won't get loaded automatically. Thanks, pulled. -- Sebastian signature.asc Description: Digital signature
Re: ARM errata 430973 on multi platform kernels (was: OMAP3-N900: Add microphone bias voltages)
Hi, On Sun, Apr 05, 2015 at 03:52:10PM +0200, Pali Rohár wrote: So I suggest to enable the IBE bit in the kernel (that part is already done) *and* in u-boot. -- Sebastian Yes. Code for both (U-Boot and linux kernel) exists and are already included. In linux kernel code is since 3.14-rc6 and in U-Boot code is there since beginning of Nokia N900 support (2013.04) directly in board code. ah. I wasn't aware, that u-boot already sets the IBE bit on the N900. Thanks for the information. -- Sebastian signature.asc Description: Digital signature
Re: ARM errata 430973 on multi platform kernels
Hi, On Mon, Apr 06, 2015 at 07:23:13PM -0700, Tony Lindgren wrote: I'm now thinking the kernel should just always set the 430973 specific cpu_v7_switch_mm for all cortex-a8 if IBE bit is set. That avoids the whole mess of early SoC detection and smc calls. And if IBE bit is not set, then we just use the regular cpu_v7_switch_mm. This will work as long as we can read the aux ctrl register IBE bit using mrc, which I believe is the case for all cortex-a8 based omap variants. If I understood it correctly we can simply call the BTB flush on cortex-a8 if IBE bit is not set, since it would be translated as nop. So it should be safe to include the call on all cortex-a8 based cpus. We may need a non-BTB-flushing function for non-cortex-a8 based cpus, though. -- Sebastian signature.asc Description: Digital signature
Re: ARM errata 430973 on multi platform kernels (was: OMAP3-N900: Add microphone bias voltages)
On Fri, Apr 03, 2015 at 02:21:48PM -0500, Robert Nelson wrote: And yes, for armhf userland one gets random oopses at least on the Nokia N900. AFAIK this is not true for all ARMv7 processors (especially non omaps), though. http://www.spinics.net/lists/linux-omap/msg108511.html See also 5c86c5339c56 (ARM: omap2plus_defconfig: Enable ARM erratum 430973 for omap3). For me the random oopses occur without this config flag and are fixed by it. The workaround is not very suitable for multi platform kernels, though, since its enabled also for unaffected platforms. As far as I can see the CONFIG_ARM_ERRATA_430973 flag is checked in proc-v7.S and in proc-v7-2level.S. I think the first file is irrelevant, since it can be fixed later (see workaround in nokia_n900_legacy_init in pdata-quirks.c). Yes so it seems, and the bootloaders should really set it. It's also disabled for multiplatform builds. These are now done in u-boot as of: v2015.04-rc4 http://git.denx.de/?p=u-boot.git;a=commit;h=c6f90e1418a84fe5fa463b38403bd1845cb6a59c Seems like include/configs/nokia_rx51.h has been forgotten. Note, that the kernel must still be able to enable the bit itself (in case NOLO is used without u-boot). -- Sebastian signature.asc Description: Digital signature
Re: ARM errata 430973 on multi platform kernels (was: OMAP3-N900: Add microphone bias voltages)
Hi, On Sun, Apr 05, 2015 at 03:26:14PM +0200, Pali Rohár wrote: Yes so it seems, and the bootloaders should really set it. It's also disabled for multiplatform builds. These are now done in u-boot as of: v2015.04-rc4 http://git.denx.de/?p=u-boot.git;a=commit;h=c6f90e1418a84fe5 fa463b38403bd1845cb6a59c Seems like include/configs/nokia_rx51.h has been forgotten. Note, that the kernel must still be able to enable the bit itself (in case NOLO is used without u-boot). You must not expect that bootloader set something. Nokia N900 has closed and signed bootloader which cannot be easily replaced and or fixed. For N900 there is U-Boot but it does not support lot of things (load kernel via usb or serial) so for developers it is better to use original Nokia bootloader. Yes, I'm aware of that. I think having the IBE bit set in u-boot has advantages nevertheless. I think the kernel can't enable the bit sufficiently early if its compiled in thumb-mode itself (CONFIG_THUMB2_KERNEL). So I suggest to enable the IBE bit in the kernel (that part is already done) *and* in u-boot. -- Sebastian signature.asc Description: Digital signature
Re: ARM errata 430973 on multi platform kernels
Hi, On Sun, Apr 05, 2015 at 06:13:47AM +0200, Matthijs van Duin wrote: On 4 April 2015 at 00:52, Tony Lindgren t...@atomide.com wrote: Right, it affects n900 for sure. My point is that it also seems to affect 37xx versions not listed to suffer from this issue. They shouldn't... erratum 430973 only affected Cortex-A8 r1, and the dm37xx should have an r3p2 right? A word of caution though: at least on the DM814x and AM335x, secure ROM sets bit 6 (IBE) in the Auxiliary Control Register, thereby enabling BTB invalidate instructions (which normally execute as nops). This is presumably a leftover of the erratum 430973 workaround, but it means there is a risk of running afoul of erratum 687067 if BTB invalidate by MVA instructions are actually used. I would actually suggest clearing IBE if it set on Cortex-A8 r2 or later processors and a secure monitor call is available to do so (there is on the DM814x and AM335x, dunno about the 37xx), also for performance reasons: BTB invalidates are quite expensive instructions (when enabled). So if I understand the issue correct, it would be ok to enable the 430973 workaround in cpu_v7_switch_mm for arm multiplatform kernels (mcr p15, 0, r2, c7, c5, 6 @ flush BTAC/BTB). On unaffected Cortex-A8 platforms the IBE bit should be unset (resulting in a nop instead of the BTB flush). So assuming, that the same is true for non Cortex-A8 platforms: Can the workaround simply be enabled by default if CPU_V7 is selected? -- Sebastian signature.asc Description: Digital signature
ARM errata 430973 on multi platform kernels (was: OMAP3-N900: Add microphone bias voltages)
Hi, On Wed, Apr 01, 2015 at 12:47:36PM -0700, Tony Lindgren wrote: OK I think debian is using v3.16 kernel Yes. It will be used for Debian jessie (not yet released) and the N900 related drivers are enabled in the armmp flavour. Unfortunately it does not work together with thumb using userland because the errata 430973 workaround is not enabled. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768890 Hmm I believe many ARMv8 boards will be randomly oopsing with armhf without that. I sort of recall random oopses just with running apt-get update on ARMv8 omaps on armhf without that: Since I don't know of any ARMv8 omaps, I will read ARMv8 as ARMv7. And yes, for armhf userland one gets random oopses at least on the Nokia N900. AFAIK this is not true for all ARMv7 processors (especially non omaps), though. http://www.spinics.net/lists/linux-omap/msg108511.html See also 5c86c5339c56 (ARM: omap2plus_defconfig: Enable ARM erratum 430973 for omap3). For me the random oopses occur without this config flag and are fixed by it. The workaround is not very suitable for multi platform kernels, though, since its enabled also for unaffected platforms. As far as I can see the CONFIG_ARM_ERRATA_430973 flag is checked in proc-v7.S and in proc-v7-2level.S. I think the first file is irrelevant, since it can be fixed later (see workaround in nokia_n900_legacy_init in pdata-quirks.c). So basically the problem comes down to proc-v7-2level.S I wonder if the ARMv8 revision range might be wrong 430973 in kernel or errata? what revision range? I think the errata is enabled unconditionally or disabled completly. Also I recall that 430973 change to the arch/arm/mm/proc-v7-2level.S fixed the issue, this should be verified though. If I understand the errata correctly the BTAC/BTB flushing is important. It would be nice if it could be limited to affected devices, though. I guess it should be tried to change the workaround, so that it does only change the behaviour of affected platforms. Otherwise its a hard decision for distributions to enable the workaround. Well we should figure out first why flush BTAC/BTB is needed in cpu_v7_switch_mm.. And if what I'm describing above is still reproducable. Reading the help text in the kernel the flushing is the actual workaround. The other changes only make it possible to do the flushing. Maybe an option would be to provide two cpu_v7_switch_mm implementations (one with the errata and one without). Then the system can start with the simple implementation. Once the boot as progressed far enough to know, that the hardware is affected by the errata, it could switch to the implementation with the flushing. -- Sebastian signature.asc Description: Digital signature
Re: [PATCHv4] media: i2c/adp1653: devicetree support for adp1653
Hi, On Fri, Apr 03, 2015 at 10:49:12AM +0200, Javier Martinez Canillas wrote: The convention nowadays is to not use unnamed DT properties for GPIOs but instead use a prefix that explains what those GPIOs are used for. So something like power-gpios or power-gpio (if there is only one GPIO) will be more suitable. Please take a look to Documentation/gpio/board.txt for more details. Ok. Actually, reading docs below, power-gpio will not work, and it needs to be power-gpios, right? No, the documentation is not updated. People used function-gpio so at the end it was added as another supported suffix, see commit: dd34c37aa3e8 (gpio: of: Allow -gpio suffix for property names). But I guess it doesn't matter if -gpio or -gpios is used. I suggest to use enable-gpio(s), since the pin is called enable in the datasheet. -- Sebastian signature.asc Description: Digital signature
Re: [PATCH RESEND] ARM: dts: OMAP3-N900: Add microphone bias voltages
Hi, On Mon, Mar 30, 2015 at 10:50:52AM -0700, Tony Lindgren wrote: * Jarkko Nikula jarkko.nik...@bitmer.com [150330 10:46]: Well, there has been regression but finding exactly how far should the fix go didn't look instantly straightforward due all DT, codec driver mic bias etc changes and I ended up not cc'ing stable. But well, I guess first kernel where this commit makes sense is 3.16+ due commit f7d0f2a08567 (ARM: dts: omap3-n900: Add sound support). Although it applies on top of commit 14e3e295b2b9 (ARM: dts: omap3-n900: Add TLV320AIC3X support) too (3.12+) but not before that. OK I think debian is using v3.16 kernel Yes. It will be used for Debian jessie (not yet released) and the N900 related drivers are enabled in the armmp flavour. Unfortunately it does not work together with thumb using userland because the errata 430973 workaround is not enabled. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768890 I guess it should be tried to change the workaround, so that it does only change the behaviour of affected platforms. Otherwise its a hard decision for distributions to enable the workaround. and that's pretty much the first kernel that is usable with dts on many omap3 devices so might make sense for that. DT support for N900's soundcard has been added in 3.16, so before that the audio stuff didn't work at all. I can add it if you think it makes sense. I guess backporting this makes sense because of fewer broken DTB files in the wild. -- Sebastian signature.asc Description: Digital signature
Re: [PATCHv3 0/2] N900 Modem Speech Support
Hi, On Sat, Mar 21, 2015 at 08:09:15PM +0100, Sebastian Reichel wrote: This patchset contains the missing speech data support for the Nokia N900 modem. [...] HSI: cmt_speech: Add cmt-speech driver HSI: nokia-modem: Add cmt-speech support drivers/hsi/clients/Kconfig | 12 +- drivers/hsi/clients/Makefile |1 + drivers/hsi/clients/cmt_speech.c | 1456 ++ drivers/hsi/clients/nokia-modem.c| 32 +- include/uapi/linux/hsi/Kbuild|2 +- include/uapi/linux/hsi/cs-protocol.h | 113 +++ 6 files changed, 1613 insertions(+), 3 deletions(-) create mode 100644 drivers/hsi/clients/cmt_speech.c create mode 100644 include/uapi/linux/hsi/cs-protocol.h I added the patches to my linux-hsi.git for-next branch aimed for 4.1. -- Sebastian signature.asc Description: Digital signature
Re: [PATCH v2 14/15] omap3isp: Add support for the Device Tree
Hi, The code crashed for me on Nokia N900. I found the following problem: On Thu, Mar 26, 2015 at 12:57:38AM +0200, Sakari Ailus wrote: [...] +static int isp_of_parse_nodes(struct device *dev, + struct v4l2_async_notifier *notifier) +{ + struct device_node *node; struct device_node *node = NULL; to avoid feeding a random pointer into of_graph_get_next_endpoint(): [...] + while (notifier-num_subdevs ISP_MAX_SUBDEVS +(node = of_graph_get_next_endpoint(dev-of_node, node))) { [...] -- Sebastian signature.asc Description: Digital signature
[PATCH] arm: dts: omap3: Add #iommu-cells to isp iommu
Add missing #iommu-cells property to the image signal processor's iommu node. This fixes the binding (property is required according to the generic iommu binding) and removes the following kernel warning triggered once the iommu node is referenced: [0.647521] /ocp/isp@480bc000: could not get #iommu-cells for /ocp/mmu@480bd400 Signed-off-by: Sebastian Reichel s...@kernel.org Cc: Sakari Ailus sakari.ai...@iki.fi Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com --- arch/arm/boot/dts/omap3.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index fe0b293..77751ef 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -440,6 +440,7 @@ }; mmu_isp: mmu@480bd400 { + #iommu-cells = 0; compatible = ti,omap2-iommu; reg = 0x480bd400 0x80; interrupts = 24; -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] omap3isp: Don't pass uninitialised arguments to of_graph_get_next_endpoint()
Hi, On Tue, Mar 31, 2015 at 02:13:28AM +0300, Sakari Ailus wrote: isp_of_parse_nodes() passed an uninitialised prev argument to of_graph_get_next_endpoint(). This is bad, fix it by assigning NULL to it in the initialisation. Signed-off-by: Sakari Ailus sakari.ai...@iki.fi Reported-by: Sebastian Reichel s...@kernel.org --- drivers/media/platform/omap3isp/isp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index ff8f633..ff51c4f 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c @@ -2338,7 +2338,7 @@ static int isp_of_parse_node(struct device *dev, struct device_node *node, static int isp_of_parse_nodes(struct device *dev, struct v4l2_async_notifier *notifier) { - struct device_node *node; + struct device_node *node = NULL; notifier-subdevs = devm_kcalloc( dev, ISP_MAX_SUBDEVS, sizeof(*notifier-subdevs), GFP_KERNEL); Acked-By: Sebastian Reichel s...@kernel.org Note, that this actually triggered the following stacktrace for me, so you may want to add a Fixes: commitid and the stacktrace to the commit message if its not merged with the original commit (relevant for people doing git bisect). [1.587951] pgd = c0004000 [1.590820] [fe17] *pgd=8fef6821, *pte=, *ppte= [1.597503] Internal error: Oops: 17 [#1] SMP ARM [1.602478] Modules linked in: [1.605743] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.0.0-rc1-00019-g258ac6a-dirty #293 [1.614379] Hardware name: Nokia RX-51 board [1.618896] task: ce0aab80 ti: ce0ac000 task.ti: ce0ac000 [1.624603] PC is at of_get_parent+0x18/0x34 [1.629150] LR is at _raw_spin_lock_irqsave+0x48/0x54 [1.634490] pc : [c05c6034]lr : [c07d5e20]psr: 6193 [1.634490] sp : ce0addc8 ip : c0c0b5a0 fp : c0b91b90 [1.646636] r10: c0b2e598 r9 : ce3804d0 r8 : [1.652160] r7 : fdfb r6 : cfc84c44 r5 : fdfb r4 : fdfb [1.659057] r3 : 6193 r2 : r1 : 95d695d5 r0 : a113 [1.665954] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel [1.673767] Control: 10c5387d Table: 80004019 DAC: 0015 [1.679870] Process swapper/0 (pid: 1, stack limit = 0xce0ac218) [1.686218] Stack: (0xce0addc8 to 0xce0ae000) [1.690826] ddc0: ce380010 c05c662c ce545810 c041d9e0 ce380010 ce1f4010 [1.699462] dde0: ce1f4000 c056b024 c07d4254 ce0aab80 0001 c142199c c0a547f0 c0085dcc [1.708129] de00: c0bfeee8 6113 c0bfef0c c07d4254 0002 ce546c90 ce1f6270 [1.716766] de20: ce1f6270 c01bced0 ce1f6270 c0a547f0 ce1f6270 ce546d50 0001 [1.725433] de40: ce1f6270 c0a547f0 ce546c90 c1457f98 ce1f4010 c0c304d4 fdfb [1.734069] de60: c0b2e598 c0b91b90 c041c6c8 c041c684 c1457f98 ce1f4010 [1.742736] de80: c0c304d4 c041ade4 ce1f4010 c0c304d4 ce1f4044 c0c18730 [1.751373] dea0: c0b91b98 c041aff4 c0c304d4 c041af60 c041936c ce0d7ca4 ce1f7e90 [1.760040] dec0: c0c304d4 ce526740 c041a608 c09f8b88 c0c304d4 c0bb3eb0 c0c304d4 [1.768676] dee0: c0bb3eb0 ce5458c0 c0b71550 c041b74c c0bb3eb0 c0bb3eb0 c0008b64 [1.777343] df00: cfeff246 cfeff241 c082416c c0aed820 0100 c0aede00 005e [1.785980] df20: cfeff241 ce0adf38 0072 cfeff292 c005b040 c0a6bfb8 cfeff294 [1.794647] df40: 0006 0006 c0ba7c74 c0ba7fa8 0006 c0c61700 0114 [1.803283] df60: c0c61700 c0b2e598 c0b91b90 c0b2eea0 0006 0006 c0b2e598 [1.811920] df80: fffbfdff c07ca054 [1.820587] dfa0: c07ca05c c000e8f0 [1.829223] dfc0: [1.837890] dfe0: 0013 [1.846557] [c05c6034] (of_get_parent) from [c05c662c] (of_graph_get_next_endpoint+0x24/0x118) [1.856018] [c05c662c] (of_graph_get_next_endpoint) from [c056b024] (isp_probe+0x118/0xf58) [1.865234] [c056b024] (isp_probe) from [c041c6c8] (platform_drv_probe+0x44/0xa4) [1.873535] [c041c6c8] (platform_drv_probe) from [c041ade4] (driver_probe_device+0x104/0x23c) [1.882934] [c041ade4] (driver_probe_device) from [c041aff4] (__driver_attach+0x94/0x98) [1.891876] [c041aff4] (__driver_attach) from [c041936c] (bus_for_each_dev+0x6c/0xa0) [1.900512] [c041936c] (bus_for_each_dev) from [c041a608] (bus_add_driver+0x144/0x1f0) [1.909271] [c041a608] (bus_add_driver) from [c041b74c] (driver_register+0x78/0xf8) [1.917755] [c041b74c] (driver_register) from [c0008b64] (do_one_initcall+0x80/0x1dc) [1.926391] [c0008b64
[PATCHv2] arm: dts: omap3: Add #iommu-cells to isp and iva iommu
Add missing #iommu-cells property to the isp and iva iommu nodes. This fixes the binding (property is required according to the generic iommu binding) and removes the following kernel warning triggered once the iommu nodes are referenced: [0.647521] /ocp/isp@480bc000: could not get #iommu-cells for /ocp/mmu@480bd400 Signed-off-by: Sebastian Reichel s...@kernel.org Cc: Sakari Ailus sakari.ai...@iki.fi Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com --- Changes since PATCHv1: * Also add property to mmu_iva --- arch/arm/boot/dts/omap3.dtsi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi index fe0b293..eb96cf9 100644 --- a/arch/arm/boot/dts/omap3.dtsi +++ b/arch/arm/boot/dts/omap3.dtsi @@ -440,6 +440,7 @@ }; mmu_isp: mmu@480bd400 { + #iommu-cells = 0; compatible = ti,omap2-iommu; reg = 0x480bd400 0x80; interrupts = 24; @@ -448,6 +449,7 @@ }; mmu_iva: mmu@5d00 { + #iommu-cells = 0; compatible = ti,omap2-iommu; reg = 0x5d00 0x80; interrupts = 28; -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 1/2] HSI: cmt_speech: Add cmt-speech driver
From: Kai Vehmanen kai.vehma...@nokia.com Introduces the cmt-speech driver, which implements a character device interface for transferring speech data frames over HSI/SSI. The driver is used to exchange voice/speech data between the Nokia N900/N950/N9's modem and its cpu. Signed-off-by: Kai Vehmanen kai.vehma...@nokia.com Signed-off-by: Carlos Chinea carlos.chi...@nokia.com Signed-off-by: Joni Lapilainen joni.lapilai...@gmail.com Since the original driver has been written for 2.6.28 some build fixes and general cleanups have been added by me: * fix build for 4.0 kernel * replace GFP_ATOMIC with GFP_KERNEL in cs_alloc_cmds() * add sanity check for CS_SET_WAKELINE ioctl * cleanup driver initialisation * rename driver to cmt-speech to be consistent with ssi-protocol driver * move cs-protocol.h to include/uapi/linux/hsi, since it describes a userspace API * replace hardcoded channels numbers with values provided via the HSI framework (e.g. coming from DT) Signed-off-by: Sebastian Reichel s...@kernel.org --- drivers/hsi/clients/Kconfig | 10 + drivers/hsi/clients/Makefile |1 + drivers/hsi/clients/cmt_speech.c | 1456 ++ include/uapi/linux/hsi/Kbuild|2 +- include/uapi/linux/hsi/cs-protocol.h | 113 +++ 5 files changed, 1581 insertions(+), 1 deletion(-) create mode 100644 drivers/hsi/clients/cmt_speech.c create mode 100644 include/uapi/linux/hsi/cs-protocol.h diff --git a/drivers/hsi/clients/Kconfig b/drivers/hsi/clients/Kconfig index bc60dec..86c8495 100644 --- a/drivers/hsi/clients/Kconfig +++ b/drivers/hsi/clients/Kconfig @@ -13,6 +13,16 @@ config NOKIA_MODEM If unsure, say N. +config CMT_SPEECH + tristate CMT speech + depends on HSI SSI_PROTOCOL + help + If you say Y here, you will enable the CMT speech protocol used + by Nokia modems. If you say M the protocol will be available as + module named cmt_speech. + + If unsure, say N. + config SSI_PROTOCOL tristate SSI protocol depends on HSI PHONET OMAP_SSI diff --git a/drivers/hsi/clients/Makefile b/drivers/hsi/clients/Makefile index 4d5bc0e..2607232 100644 --- a/drivers/hsi/clients/Makefile +++ b/drivers/hsi/clients/Makefile @@ -4,4 +4,5 @@ obj-$(CONFIG_NOKIA_MODEM) += nokia-modem.o obj-$(CONFIG_SSI_PROTOCOL) += ssi_protocol.o +obj-$(CONFIG_CMT_SPEECH) += cmt_speech.o obj-$(CONFIG_HSI_CHAR) += hsi_char.o diff --git a/drivers/hsi/clients/cmt_speech.c b/drivers/hsi/clients/cmt_speech.c new file mode 100644 index 000..e9560ef --- /dev/null +++ b/drivers/hsi/clients/cmt_speech.c @@ -0,0 +1,1456 @@ +/* + * cmt_speech.c - HSI CMT speech driver + * + * Copyright (C) 2008,2009,2010 Nokia Corporation. All rights reserved. + * + * Contact: Kai Vehmanen kai.vehma...@nokia.com + * Original author: Peter Ujfalusi peter.ujfal...@nokia.com + * + * 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. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + +#include linux/errno.h +#include linux/module.h +#include linux/types.h +#include linux/init.h +#include linux/device.h +#include linux/miscdevice.h +#include linux/mm.h +#include linux/slab.h +#include linux/fs.h +#include linux/poll.h +#include linux/sched.h +#include linux/ioctl.h +#include linux/uaccess.h +#include linux/pm_qos.h +#include linux/hsi/hsi.h +#include linux/hsi/ssi_protocol.h +#include linux/hsi/cs-protocol.h + +#define CS_MMAP_SIZE PAGE_SIZE + +struct char_queue { + struct list_headlist; + u32 msg; +}; + +struct cs_char { + unsigned intopened; + struct hsi_client *cl; + struct cs_hsi_iface *hi; + struct list_headchardev_queue; + struct list_headdataind_queue; + int dataind_pending; + /* mmap things */ + unsigned long mmap_base; + unsigned long mmap_size; + spinlock_t lock; + struct fasync_struct*async_queue; + wait_queue_head_t wait; + /* hsi channel ids */ + int channel_id_cmd; + int channel_id_data; +}; + +#define SSI_CHANNEL_STATE_READING 1 +#define SSI_CHANNEL_STATE_WRITING (1 1) +#define SSI_CHANNEL_STATE_POLL (1 2) +#define SSI_CHANNEL_STATE_ERROR
[PATCHv3 2/2] HSI: nokia-modem: Add cmt-speech support
Register cmt-speech driver in nokia-modem driver and forward hsi channel information. Signed-off-by: Sebastian Reichel s...@kernel.org --- drivers/hsi/clients/Kconfig | 2 +- drivers/hsi/clients/nokia-modem.c | 32 +++- 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/drivers/hsi/clients/Kconfig b/drivers/hsi/clients/Kconfig index 86c8495..d612620 100644 --- a/drivers/hsi/clients/Kconfig +++ b/drivers/hsi/clients/Kconfig @@ -6,7 +6,7 @@ comment HSI clients config NOKIA_MODEM tristate Nokia Modem - depends on HSI SSI_PROTOCOL + depends on HSI SSI_PROTOCOL CMT_SPEECH help Say Y here if you want to add support for the modem on Nokia N900 (Nokia RX-51) hardware. diff --git a/drivers/hsi/clients/nokia-modem.c b/drivers/hsi/clients/nokia-modem.c index 9be4867..bbb1923 100644 --- a/drivers/hsi/clients/nokia-modem.c +++ b/drivers/hsi/clients/nokia-modem.c @@ -46,6 +46,7 @@ struct nokia_modem_device { struct nokia_modem_gpio *gpios; int gpio_amount; struct hsi_client *ssi_protocol; + struct hsi_client *cmt_speech; }; static void do_nokia_modem_rst_ind_tasklet(unsigned long data) @@ -149,6 +150,7 @@ static int nokia_modem_probe(struct device *dev) struct hsi_port *port = hsi_get_port(cl); int irq, pflags, err; struct hsi_board_info ssip; + struct hsi_board_info cmtspeech; np = dev-of_node; if (!np) { @@ -214,12 +216,35 @@ static int nokia_modem_probe(struct device *dev) goto error3; } - /* TODO: register cmt-speech hsi client */ + cmtspeech.name = cmt-speech; + cmtspeech.tx_cfg = cl-tx_cfg; + cmtspeech.rx_cfg = cl-rx_cfg; + cmtspeech.platform_data = NULL; + cmtspeech.archdata = NULL; + + modem-cmt_speech = hsi_new_client(port, cmtspeech); + if (!modem-cmt_speech) { + dev_err(dev, Could not register cmt-speech device\n); + err = -ENOMEM; + goto error3; + } + + err = device_attach(modem-cmt_speech-device); + if (err == 0) { + dev_err(dev, Missing cmt-speech driver\n); + err = -EPROBE_DEFER; + goto error4; + } else if (err 0) { + dev_err(dev, Could not load cmt-speech driver (%d)\n, err); + goto error4; + } dev_info(dev, Registered Nokia HSI modem\n); return 0; +error4: + hsi_remove_client(modem-cmt_speech-device, NULL); error3: hsi_remove_client(modem-ssi_protocol-device, NULL); error2: @@ -238,6 +263,11 @@ static int nokia_modem_remove(struct device *dev) if (!modem) return 0; + if (modem-cmt_speech) { + hsi_remove_client(modem-cmt_speech-device, NULL); + modem-cmt_speech = NULL; + } + if (modem-ssi_protocol) { hsi_remove_client(modem-ssi_protocol-device, NULL); modem-ssi_protocol = NULL; -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 0/2] N900 Modem Speech Support
Hi, This patchset contains the missing speech data support for the Nokia N900 modem. Userland access goes via /dev/cmt_speech. The API is implemented in libcmtspeechdata, which is used by ofono and the freesmartphone.org project. Apart from that the device is also used by the phone binaries distributed with Maemo. So while this is a new userland ABI for the mainline kernel it has been tested in the wild for some years. Simple Testing of the API can be done by checking out libcmtspeechdata [0], building the test tool and executing it. The tool will loop back audio data received from the caller. I have prepared a kernel branch for this patchset, which can be found at [1]. Changes since PATCHv2 [3]: * Change MODULE_LICENSE from GPL to GPL v2 * Add some cleanups suggested by Pavel * Add missing dependency on SSI_PROTOCOL in Kconfig Changes since PATCHv1 [2]: * Squash cmt-speech patches together * cs_alloc_cmds(): GFP_ATOMIC - GFP_KERNEL * CS_SET_WAKELINE ioctl: Add sanity check [0] https://lkml.org/lkml/2015/2/11/526 [1] git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi.git branch/cmt-speech-2 [2] https://lkml.org/lkml/2015/3/1/282 [3] https://lkml.org/lkml/2015/3/4/1139 -- Sebastian Kai Vehmanen (1): HSI: cmt_speech: Add cmt-speech driver Sebastian Reichel (1): HSI: nokia-modem: Add cmt-speech support drivers/hsi/clients/Kconfig | 12 +- drivers/hsi/clients/Makefile |1 + drivers/hsi/clients/cmt_speech.c | 1456 ++ drivers/hsi/clients/nokia-modem.c| 32 +- include/uapi/linux/hsi/Kbuild|2 +- include/uapi/linux/hsi/cs-protocol.h | 113 +++ 6 files changed, 1613 insertions(+), 3 deletions(-) create mode 100644 drivers/hsi/clients/cmt_speech.c create mode 100644 include/uapi/linux/hsi/cs-protocol.h -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 4/4] DTS: ARM: OMAP3-N900: Add lis3lv02d support
From: Sebastian Reichel s...@kernel.or This adds support for the N900's accelerometer to the Nokia N900 DTS file. Signed-off-by: Sebastian Reichel s...@kernel.org --- arch/arm/boot/dts/omap3-n900.dts | 52 1 file changed, 52 insertions(+) diff --git a/arch/arm/boot/dts/omap3-n900.dts b/arch/arm/boot/dts/omap3-n900.dts index 6040327..b02a717 100644 --- a/arch/arm/boot/dts/omap3-n900.dts +++ b/arch/arm/boot/dts/omap3-n900.dts @@ -602,6 +602,58 @@ pinctrl-0 = i2c3_pins; clock-frequency = 40; + + lis302dl: lis3lv02d@1d { + compatible = st,lis3lv02d; + reg = 0x1d; + + Vdd-supply = vaux1; + Vdd_IO-supply = vio; + + interrupt-parent = gpio6; + interrupts = 21 20; /* 181 and 180 */ + + /* click flags */ + st,click-single-x; + st,click-single-y; + st,click-single-z; + + /* Limits are 0.5g * value */ + st,click-threshold-x = 8; + st,click-threshold-y = 8; + st,click-threshold-z = 10; + + /* Click must be longer than time limit */ + st,click-time-limit = 9; + + /* Kind of debounce filter */ + st,click-latency = 50; + + /* Interrupt line 2 for click detection */ + st,irq2-click; + + st,wakeup-x-hi; + st,wakeup-y-hi; + st,wakeup-threshold = (800/18); /* millig-value / 18 to get HW values */ + + st,wakeup2-z-hi; + st,wakeup2-threshold = (900/18); /* millig-value / 18 to get HW values */ + + st,hipass1-disable; + st,hipass2-disable; + + st,axis-x = 1;/* LIS3_DEV_X */ + st,axis-y = (-2); /* LIS3_INV_DEV_Y */ + st,axis-z = (-3); /* LIS3_INV_DEV_Z */ + + st,min-limit-x = (-32); + st,min-limit-y = 3; + st,min-limit-z = 3; + + st,max-limit-x = (-3); + st,max-limit-y = 32; + st,max-limit-z = 32; + }; }; mmc1 { -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 1/4] lis3lv02d: DT: use s32 to support negative values
From: Sebastian Reichel s...@kernel.or st,axis-{x,y,z} can be negative to imply inverted axis. Apart from that the minimal and maximal threshold may be negative. Signed-off-by: Sebastian Reichel s...@kernel.org --- drivers/misc/lis3lv02d/lis3lv02d.c | 39 +++--- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c index 3ef4627..d2b0968 100644 --- a/drivers/misc/lis3lv02d/lis3lv02d.c +++ b/drivers/misc/lis3lv02d/lis3lv02d.c @@ -950,6 +950,7 @@ int lis3lv02d_init_dt(struct lis3lv02d *lis3) struct lis3lv02d_platform_data *pdata; struct device_node *np = lis3-of_node; u32 val; + s32 sval; if (!lis3-of_node) return 0; @@ -1054,29 +1055,29 @@ int lis3lv02d_init_dt(struct lis3lv02d *lis3) if (of_get_property(np, st,hipass2-disable, NULL)) pdata-hipass_ctrl |= LIS3_HIPASS2_DISABLE; - if (of_get_property(np, st,axis-x, val)) - pdata-axis_x = val; - if (of_get_property(np, st,axis-y, val)) - pdata-axis_y = val; - if (of_get_property(np, st,axis-z, val)) - pdata-axis_z = val; + if (of_property_read_s32(np, st,axis-x, sval) == 0) + pdata-axis_x = sval; + if (of_property_read_s32(np, st,axis-y, sval) == 0) + pdata-axis_y = sval; + if (of_property_read_s32(np, st,axis-z, sval) == 0) + pdata-axis_z = sval; if (of_get_property(np, st,default-rate, NULL)) pdata-default_rate = val; - if (of_get_property(np, st,min-limit-x, val)) - pdata-st_min_limits[0] = val; - if (of_get_property(np, st,min-limit-y, val)) - pdata-st_min_limits[1] = val; - if (of_get_property(np, st,min-limit-z, val)) - pdata-st_min_limits[2] = val; - - if (of_get_property(np, st,max-limit-x, val)) - pdata-st_max_limits[0] = val; - if (of_get_property(np, st,max-limit-y, val)) - pdata-st_max_limits[1] = val; - if (of_get_property(np, st,max-limit-z, val)) - pdata-st_max_limits[2] = val; + if (of_property_read_s32(np, st,min-limit-x, sval) == 0) + pdata-st_min_limits[0] = sval; + if (of_property_read_s32(np, st,min-limit-y, sval) == 0) + pdata-st_min_limits[1] = sval; + if (of_property_read_s32(np, st,min-limit-z, sval) == 0) + pdata-st_min_limits[2] = sval; + + if (of_property_read_s32(np, st,max-limit-x, sval) == 0) + pdata-st_max_limits[0] = sval; + if (of_property_read_s32(np, st,max-limit-y, sval) == 0) + pdata-st_max_limits[1] = sval; + if (of_property_read_s32(np, st,max-limit-z, sval) == 0) + pdata-st_max_limits[2] = sval; lis3-pdata = pdata; -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 3/4] Documentation: DT: lis302: update wakeup binding
From: Sebastian Reichel s...@kernel.or This updated the documentation of the DT binding to describe the added wakeup threshold and second wakeup engine. It also adds a note, that the axis values may be negative. Signed-off-by: Sebastian Reichel s...@kernel.org --- Documentation/devicetree/bindings/misc/lis302.txt | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/misc/lis302.txt b/Documentation/devicetree/bindings/misc/lis302.txt index 6def86f..2a19bff 100644 --- a/Documentation/devicetree/bindings/misc/lis302.txt +++ b/Documentation/devicetree/bindings/misc/lis302.txt @@ -46,11 +46,18 @@ Optional properties for all bus drivers: interrupt 2 - st,wakeup-{x,y,z}-{lo,hi}: set wakeup condition on x/y/z axis for upper/lower limit + - st,wakeup-threshold:set wakeup threshold + - st,wakeup2-{x,y,z}-{lo,hi}: set wakeup condition on x/y/z axis for + upper/lower limit for second wakeup + engine. + - st,wakeup2-threshold: set wakeup threshold for second wakeup + engine. - st,highpass-cutoff-hz=: 1, 2, 4 or 8 for 1Hz, 2Hz, 4Hz or 8Hz of highpass cut-off frequency - st,hipass{1,2}-disable: disable highpass 1/2. - st,default-rate=: set the default rate - - st,axis-{x,y,z}=: set the axis to map to the three coordinates + - st,axis-{x,y,z}=: set the axis to map to the three coordinates. + Negative values can be used for inverted axis. - st,{min,max}-limit-{x,y,z} set the min/max limits for x/y/z axis (used by self-test) -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 0/4] lis3lv02d: update DT binding for use with Nokia N900
Hi, The lis302 has already a DT binding described in [0], which descibes misc. hardware properties. The current binding does not support all values needed to convert the Nokia N900's platform data to DT, though. This patchset introduces support for describing inverted axis, configuration of second wakeup unit and wakeup threshold support. The series is based on top of v4.0-rc1 and has been tested on my Nokia N900. [0] Documentation/devicetree/bindings/misc/lis302.txt -- Sebastian Sebastian Reichel (4): lis3lv02d: DT: use s32 to support negative values lis3lv02d: DT: add wakeup unit 2 and wakeup threshold Documentation: DT: lis302: update wakeup binding DTS: ARM: OMAP3-N900: Add lis3lv02d support Documentation/devicetree/bindings/misc/lis302.txt | 9 +++- arch/arm/boot/dts/omap3-n900.dts | 52 + drivers/misc/lis3lv02d/lis3lv02d.c| 56 +++ 3 files changed, 97 insertions(+), 20 deletions(-) -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 2/4] lis3lv02d: DT: add wakeup unit 2 and wakeup threshold
From: Sebastian Reichel s...@kernel.or This adds support for the the wakeup threshold and support for the second wakeup unit to the DT based setup. Signed-off-by: Sebastian Reichel s...@kernel.org --- drivers/misc/lis3lv02d/lis3lv02d.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c index d2b0968..4739689 100644 --- a/drivers/misc/lis3lv02d/lis3lv02d.c +++ b/drivers/misc/lis3lv02d/lis3lv02d.c @@ -1032,6 +1032,23 @@ int lis3lv02d_init_dt(struct lis3lv02d *lis3) pdata-wakeup_flags |= LIS3_WAKEUP_Z_LO; if (of_get_property(np, st,wakeup-z-hi, NULL)) pdata-wakeup_flags |= LIS3_WAKEUP_Z_HI; + if (of_get_property(np, st,wakeup-threshold, val)) + pdata-wakeup_thresh = val; + + if (of_get_property(np, st,wakeup2-x-lo, NULL)) + pdata-wakeup_flags2 |= LIS3_WAKEUP_X_LO; + if (of_get_property(np, st,wakeup2-x-hi, NULL)) + pdata-wakeup_flags2 |= LIS3_WAKEUP_X_HI; + if (of_get_property(np, st,wakeup2-y-lo, NULL)) + pdata-wakeup_flags2 |= LIS3_WAKEUP_Y_LO; + if (of_get_property(np, st,wakeup2-y-hi, NULL)) + pdata-wakeup_flags2 |= LIS3_WAKEUP_Y_HI; + if (of_get_property(np, st,wakeup2-z-lo, NULL)) + pdata-wakeup_flags2 |= LIS3_WAKEUP_Z_LO; + if (of_get_property(np, st,wakeup2-z-hi, NULL)) + pdata-wakeup_flags2 |= LIS3_WAKEUP_Z_HI; + if (of_get_property(np, st,wakeup2-threshold, val)) + pdata-wakeup_thresh2 = val; if (!of_property_read_u32(np, st,highpass-cutoff-hz, val)) { switch (val) { -- 2.1.4 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv3 0/2] N900 Modem Speech Support
Hi, On Sat, Mar 21, 2015 at 08:09:15PM +0100, Sebastian Reichel wrote: [1] git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi.git branch/cmt-speech-2 This should actually be: git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi.git branch/cmt-speech-3 -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 3/3] ARM: omap2plus_defconfig: Enable n900 modem as loadable modules
Hi Tony, On Mon, Mar 16, 2015 at 01:00:03PM -0700, Tony Lindgren wrote: Enable n900 modem as loadable modules. Acked-By: Sebastian Reichel s...@kernel.org [...] +CONFIG_HSI_CHAR=m [...] I think this one should be disabled by default. It's only needed by very few people (it exposes the hsi bus to userspace, like i2c-dev driver does for i2c). -- Sebastian signature.asc Description: Digital signature
Re: [PATCH v6 6/6] wlcore: remove wl12xx_platform_data
Hi, On Mon, Mar 16, 2015 at 08:29:39AM -0700, Tony Lindgren wrote: * Arnd Bergmann a...@arndb.de [150315 05:10]: On Sunday 15 March 2015 10:50:42 Eliad Peller wrote: yeah, i missed it :/ looks like there's no platform that defines platform data for it. i'll replace the dev_get_platdata() with a function that only parses the clock-frequency properties (the irq is taken in this case from the spi_device). (or maybe i should just drop it, as no one actually uses it?) I don't think we should drop the driver, but dropping the platform_data support sounds reasonable. New users of this driver should all be using DT, and if there is a good reason to use platform_data, it's easily put back. Well we have n8x0 and n900 using the spi driver. For those, n8x0 boot all in dts mode, but n900 still also boots in legacy mode. It seems the board-rx51-peripherals.c only passes the power_gpio though, so that should be easy to keep around. We should keep things still working for n900 in legacy mode until the pending regressions with device tree based booting have been cleared for at least one merge cycle. I believe the last pending issues is the support for ATAG_REVISION in device tree mode as posted by Pali. mh by migrating to newer gpiod interface platform data is no longer needed (instead the boardfile would need a gpiod_lookup_table). That way all of the dirty code is in the board file and will be removed once the time comes. See for example rx51_fmtx_gpios_table. Note: This is independent of wl12xx changes, since N900 uses wl1251. -- Sebastian signature.asc Description: Digital signature
Re: [PATCH v4 3/6] Documentation: DT: Document twl4030-madc-battery bindings
Hi, On Wed, Mar 11, 2015 at 10:43:17AM -0700, Tony Lindgren wrote: No no, capacity-uah is what we should use, but you need an ack from the battery and device tree people that this is OK. Let's not add ti,capacity-uah” as that can obviously be a generic property. I'm okay with capacity-uah. [...] Oh if they are battery spicific, then ideally we'd have generic batery voltage to capacity maps property rather than a custom ti specific property. To avoid extra hassles later on, maybe you could submit a generic binding patch only documenting it to the battery people and the device tree people? That will make it easier to maintain this driver in the long run. Actually the proper way would be to differentiate between the battery and the measurement chip / adc and that should be implemented in the long run. The kernel's power supply framework is not yet ready for it, though. Example DT: battery { battery-specific-data; }; fuel-gauge { measures = battery; }; charger { charges = battery; }; Since infrastructure for generic bindings is missing, I think its best to have the vendor properties for now and map this to generic properties, once they have been specified. -- Sebastian signature.asc Description: Digital signature
Re: twl4030_charger: need changes to get probed?
Hi, On Mon, Mar 09, 2015 at 11:06:53AM +1100, NeilBrown wrote: On Sat, 7 Mar 2015 22:01:02 +0100 Sebastian Reichel s...@debian.org wrote: platform_driver_probe() does not support deferred probing. Neil, can you take this patch into your series for the next round? I could, but I do wonder if it is the right thing to do. Shouldn't we fix platform_driver_probe() to support deferred probing. well most drivers use platform_driver_register anyways. Other subsystems, like e.g. i2c have converted all drivers already. In drivers/power/ there are only three drivers using platform_driver_probe: drivers/power/avs/smartreflex.c - ok here drivers/power/reset/brcmstb-reboot.c - looks ok, too drivers/power/twl4030_charger.c - should probably be converted As I understand it, it refused to retry a probe if there is an error, and the comments suggest that such retrying is avoided because it would be a waste of time: /* * Prevent driver from requesting probe deferral to avoid further * futile probe attempts. */ In this case, it isn't futile. All drivers would benefit of being probed again if they returned EPROBEDEFER, but their probe function can't be called again if they use driver_platform_probe, since the probe function will be unloaded when it should be called again. Apart from that the .probe function pointer is not set. Thus trying to probe the driver again at a later point is a waste of time and futile, since it will definitely fail. Earlier there is a comment saying: * Use this instead of platform_driver_register() when you know the device * is not hotpluggable and has already been registered, and you want to * remove its run-once probe() infrastructure from memory after the driver * has bound to the device. I presume all this applies. I assume that the only problem is a probe-order thing. So maybe we should fix platform_driver_probe() to do the right thing with -EPROBEDEFER?? Trouble is, I really don't understand the point or mechanism for platform_driver_probe(), so I cannot suggest anything. But I have been annoyed before that platform_driver_probe doesn't cope with EPROBEDEFER, so I would like it fixed. platform_driver_probe is not about probe-order, but about not having the probe function in memory once the driver is loaded. So the probe function cannot be called again. If you don't want this use platform_driver_register, as most drivers actually do. I guess we should add some coccinelle scripts for detection of potentially broken drivers (e.g. everything requesting gpios/pinctrl together with platform_driver_register). -- Sebastian signature.asc Description: Digital signature
Re: twl4030_charger: need changes to get probed?
Hi, On Fri, Mar 06, 2015 at 10:24:17PM +0100, Pavel Machek wrote: According to n900 dts, twl4030-bci (aka charger) should be included. its part of twl, but not used on N900 afaik. (But it does not seem to do anything useful on n900. I was hoping for measurement of input voltage, but .. no.) check for rx51-battery. Any ideas why the patch below is needed? platform_driver_probe() does not support deferred probing. Neil, can you take this patch into your series for the next round? -- Sebastian Signed-off-by: Pavel Machek pa...@ucw.cz diff --git a/drivers/power/twl4030_charger.c b/drivers/power/twl4030_charger.c index d35b83e..96bbbe9 100644 --- a/drivers/power/twl4030_charger.c +++ b/drivers/power/twl4030_charger.c @@ -714,6 +722,7 @@ static const struct of_device_id twl_bci_of_match[] = { MODULE_DEVICE_TABLE(of, twl_bci_of_match); static struct platform_driver twl4030_bci_driver = { + .probe = twl4030_bci_probe, .driver = { .name = twl4030_bci, .of_match_table = of_match_ptr(twl_bci_of_match), @@ -721,7 +730,7 @@ static struct platform_driver twl4030_bci_driver = { .remove = __exit_p(twl4030_bci_remove), }; -module_platform_driver_probe(twl4030_bci_driver, twl4030_bci_probe); +module_platform_driver(twl4030_bci_driver); MODULE_AUTHOR(Gražvydas Ignotas); MODULE_DESCRIPTION(TWL4030 Battery Charger Interface driver); signature.asc Description: Digital signature
Re: [PATCH 07/15] twl4030_charger: allow fine control of charger current.
Hi Pavel, On Wed, Mar 04, 2015 at 11:24:15AM +0100, Pavel Machek wrote: (Now I'd need to study the datasheets... and figure out how to enable this on N900). The N900 uses bq24150a for charging ;) -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 03/15] twl4030_charger: use devres for power_supply_register and kzalloc.
Hi, On Tue, Feb 24, 2015 at 03:33:50PM +1100, NeilBrown wrote: [...] @@ -667,13 +667,6 @@ static int __init twl4030_bci_probe(struct platform_device *pdev) return 0; fail: - power_supply_unregister(bci-usb); -fail_register_usb: - power_supply_unregister(bci-ac); -fail_register_ac: -fail_no_battery: - kfree(bci); - return ret; } Please replace goto fail with return ret, goto is no longer needed. -- Sebastian signature.asc Description: Digital signature
Re: [PATCH 09/15] twl4030_charger: allow max_current to be managed via sysfs.
Hi, On Thu, Mar 05, 2015 at 05:26:00PM +1100, NeilBrown wrote: [...] +What: /sys/class/power_supply/twl4030_ac/max_current + /sys/class/power_supply/twl4030_usb/max_current +Description: + Read/Write limit on current which which may + be drawn from the ac (Accessory Charger) or + USB port. + + Value is in micro-Amps. + + Value is set automatically to an appropriate + value when a cable is plugged on unplugged. ^^ s/on/or -- Sebastian signature.asc Description: Digital signature