mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Fabio Estevam <festevam@gmail.com>,
	Ksenija Stanojevic <ksenija.stanojevic@gmail.com>,
	Marek Vasut <marex@denx.de>
Cc: linux-iio@vger.kernel.org,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" 
	<linux-arm-kernel@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	NXP Linux Team <linux-imx@nxp.com>
Subject: Re: [PATCH v1 1/1] iio: adc: mxs-lradc-adc: Get rid of OF specifics
Date: Tue, 21 Jun 2022 13:58:16 +0300	[thread overview]
Message-ID: <YrGkSMUsMzTqBEJz@smile.fi.intel.com> (raw)
In-Reply-To: <CAOMZO5CtjkjsbOTaNF7+Hwswsn-fs2WNK=zyFL53JnBBpS8=0Q@mail.gmail.com>

On Mon, Jun 20, 2022 at 06:13:53PM -0300, Fabio Estevam wrote:
> On Mon, May 30, 2022 at 2:33 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:

...

> I tried to apply the same change inside
> drivers/input/touchscreen/mxs-lradc-ts.c:
> 
> --- a/drivers/input/touchscreen/mxs-lradc-ts.c
> +++ b/drivers/input/touchscreen/mxs-lradc-ts.c
> @@ -675,11 +675,9 @@ static int mxs_lradc_ts_probe(struct platform_device *pdev)
>                 if (irq < 0)
>                         return irq;
> 
> -               virq = irq_of_parse_and_map(node, irq);
> -
>                 mxs_lradc_ts_stop(ts);
> 
> -               ret = devm_request_irq(dev, virq,
> +               ret = devm_request_irq(dev, irq,
>                                        mxs_lradc_ts_handle_irq,
>                                        0, mxs_lradc_ts_irq_names[i], ts);
>                 if (ret)
> 
> but I still get the following warning:

So just to be sure. You got it before the above change applied, correct?

I'm wondering how this all LRADC was supposed to work. The IRQs are assigned
based on abstract numbering without any IRQ domain behind it. This is not how
it's designed in Linux. Adding Ksenija and Marek to shed a light.

> [    6.135583] ------------[ cut here ]------------
> [    6.140366] WARNING: CPU: 0 PID: 1 at drivers/base/platform.c:449
> __platform_get_irq_byname+0x74/0x90
> [    6.151053] 0 is an invalid IRQ number
> [    6.155201] Modules linked in:
> [    6.158444] CPU: 0 PID: 1 Comm: swapper Not tainted
> 5.18.5-00001-g3e38be7e4832 #108
> [    6.166537] Hardware name: Freescale MXS (Device Tree)
> [    6.172040]  unwind_backtrace from show_stack+0x10/0x14
> [    6.177503]  show_stack from __warn+0xc4/0x1cc
> [    6.182356]  __warn from warn_slowpath_fmt+0x90/0xc8
> [    6.187549]  warn_slowpath_fmt from __platform_get_irq_byname+0x74/0x90
> [    6.194698]  __platform_get_irq_byname from platform_get_irq_byname+0x10/0x30
> [    6.202286]  platform_get_irq_byname from mxs_lradc_ts_probe+0x19c/0x380
> [    6.209216]  mxs_lradc_ts_probe from platform_probe+0x58/0xb8
> [    6.215383]  platform_probe from really_probe+0xfc/0x288
> [    6.220907]  really_probe from __driver_probe_device+0x80/0xe4
> [    6.227145]  __driver_probe_device from driver_probe_device+0x30/0xd8
> [    6.234010]  driver_probe_device from __driver_attach+0x70/0xf4
> [    6.240137]  __driver_attach from bus_for_each_dev+0x74/0xc0
> [    6.246195]  bus_for_each_dev from bus_add_driver+0x154/0x1e8
> [    6.252359]  bus_add_driver from driver_register+0x74/0x108
> [    6.258131]  driver_register from do_one_initcall+0x8c/0x2fc
> [    6.264198]  do_one_initcall from kernel_init_freeable+0x184/0x210
> [    6.270588]  kernel_init_freeable from kernel_init+0x10/0x108
> [    6.276756]  kernel_init from ret_from_fork+0x14/0x3c
> [    6.282224] Exception stack(0xc8819fb0 to 0xc8819ff8)
> [    6.287444] 9fa0:                                     00000000
> 00000000 00000000 00000000
> [    6.295988] 9fc0: 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000 00000000
> [    6.304631] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
> [    6.311392] irq event stamp: 128211
> [    6.315220] hardirqs last  enabled at (128221): [<c0069c44>]
> __up_console_sem+0x54/0x64
> [    6.323632] hardirqs last disabled at (128230): [<c0069c30>]
> __up_console_sem+0x40/0x64
> [    6.331821] softirqs last  enabled at (128200): [<c00098e4>]
> __do_softirq+0x31c/0x4bc
> [    6.340041] softirqs last disabled at (128191): [<c0020f04>]
> irq_exit+0x150/0x18c
> [    6.347913] ---[ end trace 0000000000000000 ]---
> [    6.364587] input: mxs-lradc-ts as
> /devices/soc0/80000000.apb/80040000.apbx/80050000.lradc/mxs-lradc-ts/input/input0
> 
> Any suggestions?

-- 
With Best Regards,
Andy Shevchenko



  parent reply	other threads:[~2022-06-21 11:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-30 17:33 Andy Shevchenko
2022-06-03 17:10 ` Jonathan Cameron
2022-06-20 19:42   ` Jonathan Cameron
2022-09-06 13:36     ` Andy Shevchenko
2022-09-11  9:52       ` Jonathan Cameron
2022-09-12 10:21         ` Andy Shevchenko
2022-09-12 10:24           ` Andy Shevchenko
2022-06-20 21:13 ` Fabio Estevam
     [not found]   ` <CAHp75Vd9yah3D8dUOPinhj=nm9GQs3xOsWZRL=6CvaROZC3OCQ@mail.gmail.com>
2022-06-20 21:56     ` Fabio Estevam
2022-06-21 10:26       ` Andy Shevchenko
2022-06-21 10:35         ` Andy Shevchenko
2022-06-21 10:58   ` Andy Shevchenko [this message]
2022-06-21 11:06     ` Fabio Estevam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YrGkSMUsMzTqBEJz@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=festevam@gmail.com \
    --cc=jic23@kernel.org \
    --cc=kernel@pengutronix.de \
    --cc=ksenija.stanojevic@gmail.com \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®