Wednesday, October 23, 2013

linux.kernel - 26 new messages in 12 topics - digest

linux.kernel
http://groups.google.com/group/linux.kernel?hl=en

linux.kernel@googlegroups.com

Today's topics:

* x86, apic, kexec: Add disable_cpu_apic kernel parameter - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/0919f0b792042125?hl=en
* pstore: avoid incorrectly mark entry as duplicate - 2 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/56fd8c027c1a8943?hl=en
* PowerCap: Convert class code to use dev_groups - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/52bfcba1b48f6792?hl=en
* EFI and multiboot2 devlopment work for Xen - 3 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/da7cdcd6a36c754d?hl=en
* Input: twl4030-pwrbutton - add device tree support - 7 messages, 3 authors
http://groups.google.com/group/linux.kernel/t/6fbf072dae47363a?hl=en
* [PATCH] xen/hvc-console: Make it work with HVM guests. - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/2aaca599afd4080f?hl=en
* block/aio: Enable sysfs nomerge control for I/O requests in the plug list -
1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/71c47838281b53b0?hl=en
* Usage of for_each_child_of_node() - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/f64462e33b953a9b?hl=en
* mm: Demarcate and maintain pageblocks in region-order in the zones'
freelists - 2 messages, 1 author
http://groups.google.com/group/linux.kernel/t/ef2d6c56a642613f?hl=en
* tps6507x-ts: Add DT support - 4 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/0a4e25430e981a8a?hl=en
* x86: boot: support minigzip bzImage compression - 2 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/c21f55c6872562fa?hl=en
* qrwlock: A queue read/write lock implementation - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/60f334b5bc420bf4?hl=en

==============================================================================
TOPIC: x86, apic, kexec: Add disable_cpu_apic kernel parameter
http://groups.google.com/group/linux.kernel/t/0919f0b792042125?hl=en
==============================================================================

== 1 of 1 ==
Date: Wed, Oct 23 2013 9:00 am
From: Vivek Goyal


On Wed, Oct 23, 2013 at 09:05:06AM +0900, HATAYAMA Daisuke wrote:

[..]
> >Do you literally mean a human at each boot will have to configure
> >the kdump configuration files for passing disable_cpu_apic?
> >Or do you envision the setting of disable_cpu_apic being put into
> >the kdump initialization scripts?
> >
> >thanks
> >
> >Jerry
>
> Nearer to the former case, but this is not what a human should do. It's
> a cumbersome task. I think, on fedora/RHEL system for example, kdump
> service should check at each boot automatically.

Hi Hatayama,

So what information should I look for to prepare disable_cpu_apic=X in
kdump script?

Is BSP processor info exported to user space somewhere? Or assuming that
processor 0 is BSP and corresponding apicid should be disabled in kdump
kernel is good enough?

I am looking at /proc/cpuinfo and following 3 fields seem interesting.

processor: 0
apicid : 0
initial apicid : 0

What's the difference between apicid and "initial apicid". I guess
initial apicid reflects the apicid number as set by firmware and then
kernel can overwrite it and new number would be reflected in "apicid"?

If that's the case, then I guess we should be looking at "apicid" of
processor "0" and set that in disable_cpu_apic? Because that's the
number kdump kernel boot should see in apic upon boot.

Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/





==============================================================================
TOPIC: pstore: avoid incorrectly mark entry as duplicate
http://groups.google.com/group/linux.kernel/t/56fd8c027c1a8943?hl=en
==============================================================================

== 1 of 2 ==
Date: Wed, Oct 23 2013 9:00 am
From: Richard Weinberger


On Wed, Oct 23, 2013 at 4:55 PM, Madper Xie <cxie@redhat.com> wrote:
> pstore try to find duplicate entries by check both ID, type and psi.
> They are not really enough for efi backend. dumped vars always have
> the same type, psi and ID. like follows:
> dump-type0-9-1-1382511508-C-cfc8fc79-be2e-4ddc-97f0-9f98bfe298a0
> dump-type0-9-1-1382515661-C-cfc8fc79-be2e-4ddc-97f0-9f98bfe298a0
>
> The "duplicate" entries won't appear in pstorefs. And a complain will be
> print -- pstore: failed to load 76 record(s) from 'efi'
> So I add one more check: timespec.
>
> Signed-off-by: Madper Xie <cxie@redhat.com>
> ---
> fs/pstore/inode.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
> index 1282384..f70f1e5 100644
> --- a/fs/pstore/inode.c
> +++ b/fs/pstore/inode.c
> @@ -47,6 +47,7 @@ static LIST_HEAD(allpstore);
> struct pstore_private {
> struct list_head list;
> struct pstore_info *psi;
> + struct timespec time;
> enum pstore_type_id type;
> u64 id;
> int count;
> @@ -290,7 +291,8 @@ int pstore_mkfile(enum pstore_type_id type, char *psname, u64 id, int count,
> list_for_each_entry(pos, &allpstore, list) {
> if (pos->type == type &&
> pos->id == id &&
> - pos->psi == psi) {
> + pos->psi == psi &&
> + !timespec_compare(&pos->time, &time)) {
> rc = -EEXIST;
> break;
> }
> @@ -312,6 +314,7 @@ int pstore_mkfile(enum pstore_type_id type, char *psname, u64 id, int count,
> private->id = id;
> private->count = count;
> private->psi = psi;
> + memcpy(&private->time, &time, sizeof(struct timespec));
>
> switch (type) {
> case PSTORE_TYPE_DMESG:


As discussed on IRC, why don't you compare the variable names?

--
Thanks,
//richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/




== 2 of 2 ==
Date: Wed, Oct 23 2013 9:20 am
From: Madper Xie



richard.weinberger@gmail.com writes:

> On Wed, Oct 23, 2013 at 4:55 PM, Madper Xie <cxie@redhat.com> wrote:
>> pstore try to find duplicate entries by check both ID, type and psi.
>> They are not really enough for efi backend. dumped vars always have
>> the same type, psi and ID. like follows:
>> dump-type0-9-1-1382511508-C-cfc8fc79-be2e-4ddc-97f0-9f98bfe298a0
>> dump-type0-9-1-1382515661-C-cfc8fc79-be2e-4ddc-97f0-9f98bfe298a0
>>
>> The "duplicate" entries won't appear in pstorefs. And a complain will be
>> print -- pstore: failed to load 76 record(s) from 'efi'
>> So I add one more check: timespec.
>>
>> Signed-off-by: Madper Xie <cxie@redhat.com>
>> ---
>> fs/pstore/inode.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
>> index 1282384..f70f1e5 100644
>> --- a/fs/pstore/inode.c
>> +++ b/fs/pstore/inode.c
>> @@ -47,6 +47,7 @@ static LIST_HEAD(allpstore);
>> struct pstore_private {
>> struct list_head list;
>> struct pstore_info *psi;
>> + struct timespec time;
>> enum pstore_type_id type;
>> u64 id;
>> int count;
>> @@ -290,7 +291,8 @@ int pstore_mkfile(enum pstore_type_id type, char *psname, u64 id, int count,
>> list_for_each_entry(pos, &allpstore, list) {
>> if (pos->type == type &&
>> pos->id == id &&
>> - pos->psi == psi) {
>> + pos->psi == psi &&
>> + !timespec_compare(&pos->time, &time)) {
>> rc = -EEXIST;
>> break;
>> }
>> @@ -312,6 +314,7 @@ int pstore_mkfile(enum pstore_type_id type, char *psname, u64 id, int count,
>> private->id = id;
>> private->count = count;
>> private->psi = psi;
>> + memcpy(&private->time, &time, sizeof(struct timespec));
>>
>> switch (type) {
>> case PSTORE_TYPE_DMESG:
>
>
> As discussed on IRC, why don't you compare the variable names?
Howdy Richard,
Let's analyze the name of "duplicate" entries:
>> dump-type0-9-1-1382511508-C-cfc8fc79-be2e-4ddc-97f0-9f98bfe298a0
>> dump-type0-9-1-1382515661-C-cfc8fc79-be2e-4ddc-97f0-9f98bfe298a0
The have the same name except timestamp. In this case, there is no
difference between compare names and compare timestamps.
( Yeah, I'm pretty sure the guid will be the same one --
LINUX_EFI_CRASH_GUID )
But efi is only one backend. For other backends, we don't sure if they
will add timestamp to name. So...

--
Best,
Madper Xie.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/





==============================================================================
TOPIC: PowerCap: Convert class code to use dev_groups
http://groups.google.com/group/linux.kernel/t/52bfcba1b48f6792?hl=en
==============================================================================

== 1 of 1 ==
Date: Wed, Oct 23 2013 9:10 am
From: Greg Kroah-Hartman


On Wed, Oct 23, 2013 at 01:37:35PM +0200, Thierry Reding wrote:
> The newly added power capping framework uses the obsolete .dev_attrs
> field of struct class. However this field will be removed in 3.13, so
> convert the code to use the .dev_groups field instead.
>
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/





==============================================================================
TOPIC: EFI and multiboot2 devlopment work for Xen
http://groups.google.com/group/linux.kernel/t/da7cdcd6a36c754d?hl=en
==============================================================================

== 1 of 3 ==
Date: Wed, Oct 23 2013 9:20 am
From: "Jan Beulich"


>>> Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> 10/23/13 3:15 PM >>>
>On Wed, Oct 23, 2013 at 09:32:30AM +0100, Ian Campbell wrote:
>> Am I correct that xen.efi today can be loaded from grub today using the
>> chainload command? Whereupon it will parse the xen.cfg and load the dom0
>> kernel and load things from FAT etc and everything just works. IOW
>> UEFI -> chainload(Xen)
>> and
>> UEFI -> chainload(grub) -> chainload(Xen)
>> work equivalently from the POV of Xen?
>
>Yes. However it does require the user to know the magic values in the Xen
>configuration file and setup the chainload stanze correctly. That means
>if a user wishes to modify some of the bootup options they have to modify
>the Xen configuration file. No runtime changes.

Not necessarily - there's no reason for it being impossible to specify options
in the GrUB entry, nor for option added on the GrUB prompt (or its graphical
equivalent) to be passed to the chain loaded binary. If that doesn't already
work, it can't be really hard to implement.

Jan

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/




== 2 of 3 ==
Date: Wed, Oct 23 2013 9:20 am
From: "Jan Beulich"


>>> Ian Campbell <ian.campbell@citrix.com> 10/23/13 10:32 AM >>>
>The second (standard PE/COFF entry point) can be launched using the UEFI
>chainloader call. AIUI this should work with xen.efi today. There are
>some limitations however, firstly there is no way to pass additional
>blobs and so the launched image must load e.g. dom0 and initrd itself,
>which Linux does by processing the initrd= option in the command line
>and using UEFI functionality to load the blobs from disk. Xen does by
>reading its own config file and loading dom0 + initrd based on that. I
>assume this means that chainload doesn't call ExitBootServices (anyone
>can confirm?). Another limitation of this is that the UEFI functionality
>to load stuff from disk can only read from FAT partitions.

Again that's only a pseudo limitation: Rather than implementing support
for other file systems in GrUB, it should be implemented as EFI module.
Then any subsequent EFI binary would benefit from this. (Obviously, as
a half hearted intermediate solution, GrUB - which iiuc stays in memory
after transferring control - could export its file system support to its
descendants).

> It's not
>clear to me if this mechanism limits only the loading of additional
>blobs from FAT or if that applies to the kernel image itself.

Only the additional blobs would be affected.

> The
>kernel is PIC on entry so no relocations are actually needed. In theory
>the Linux EFI stub could instead have included a NULL relocation table
>but doesn't. (I expect Xen is in the same boat WRT relocations).

No, Xen definitely needs its relocations processed.

Jan

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/




== 3 of 3 ==
Date: Wed, Oct 23 2013 10:10 am
From: Vladimir 'φ-coder/phcoder' Serbinenko


> GrUB - which iiuc stays in memory
> after transferring control - could export its file system support to its
> descendants).

Xen shouldn't need to load any file after multiboot2 entry point. The
needed files would already be in memory with pointers to them passed.
If you insist on being able to load directly from EFI, then IMO the best
way is to have a PE executable with one of sections containing Xen and
code which would load remaining files to memory and call common entry point.







==============================================================================
TOPIC: Input: twl4030-pwrbutton - add device tree support
http://groups.google.com/group/linux.kernel/t/6fbf072dae47363a?hl=en
==============================================================================

== 1 of 7 ==
Date: Wed, Oct 23 2013 9:20 am
From: Sebastian Reichel


Hi,

On Wed, Oct 23, 2013 at 05:09:36PM +0100, Mark Rutland wrote:
> On Wed, Oct 23, 2013 at 04:01:20PM +0100, Sebastian Reichel wrote:
> > Add device tree support for twl4030 power button driver.
>
> This requires a binding document. As it is it's not possible to review.

Right. I will add it and sent a v3.

> >
> > Signed-off-by: Sebastian Reichel <sre@debian.org>
> > ---
> > drivers/input/misc/twl4030-pwrbutton.c | 16 ++++++++++++----
> > 1 file changed, 12 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
> > index b9a05fd..a3a0fe3 100644
> > --- a/drivers/input/misc/twl4030-pwrbutton.c
> > +++ b/drivers/input/misc/twl4030-pwrbutton.c
> > @@ -52,7 +52,7 @@ static irqreturn_t powerbutton_irq(int irq, void *_pwr)
> > return IRQ_HANDLED;
> > }
> >
> > -static int __init twl4030_pwrbutton_probe(struct platform_device *pdev)
> > +static int twl4030_pwrbutton_probe(struct platform_device *pdev)
> > {
> > struct input_dev *pwr;
> > int irq = platform_get_irq(pdev, 0);
> > @@ -106,16 +106,24 @@ static int __exit twl4030_pwrbutton_remove(struct platform_device *pdev)
> > return 0;
> > }
> >
> > +#if IS_ENABLED(CONFIG_OF)
> > +static const struct of_device_id twl4030_pwrbutton_dt_match_table[] = {
> > + { .compatible = "ti,twl4030-pwrbutton" },
>
> There's no need to shorten this, "ti,twl4030-power-button" would be far easier
> to understand. Unless the datasheet refers to it as pwrbutton?

Yes it's abbreviated in the datasheet.

-- Sebastian




== 2 of 7 ==
Date: Wed, Oct 23 2013 9:20 am
From: Mark Rutland


On Wed, Oct 23, 2013 at 04:01:20PM +0100, Sebastian Reichel wrote:
> Add device tree support for twl4030 power button driver.

This requires a binding document. As it is it's not possible to review.

Mark.

>
> Signed-off-by: Sebastian Reichel <sre@debian.org>
> ---
> drivers/input/misc/twl4030-pwrbutton.c | 16 ++++++++++++----
> 1 file changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
> index b9a05fd..a3a0fe3 100644
> --- a/drivers/input/misc/twl4030-pwrbutton.c
> +++ b/drivers/input/misc/twl4030-pwrbutton.c
> @@ -52,7 +52,7 @@ static irqreturn_t powerbutton_irq(int irq, void *_pwr)
> return IRQ_HANDLED;
> }
>
> -static int __init twl4030_pwrbutton_probe(struct platform_device *pdev)
> +static int twl4030_pwrbutton_probe(struct platform_device *pdev)
> {
> struct input_dev *pwr;
> int irq = platform_get_irq(pdev, 0);
> @@ -106,16 +106,24 @@ static int __exit twl4030_pwrbutton_remove(struct platform_device *pdev)
> return 0;
> }
>
> +#if IS_ENABLED(CONFIG_OF)
> +static const struct of_device_id twl4030_pwrbutton_dt_match_table[] = {
> + { .compatible = "ti,twl4030-pwrbutton" },

There's no need to shorten this, "ti,twl4030-power-button" would be far easier
to understand. Unless the datasheet refers to it as pwrbutton?

Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/




== 3 of 7 ==
Date: Wed, Oct 23 2013 9:40 am
From: Aaro Koskinen


Hi,

On Wed, Oct 23, 2013 at 05:01:22PM +0200, Sebastian Reichel wrote:
> static int __exit twl4030_pwrbutton_remove(struct platform_device *pdev)
> {
> struct input_dev *pwr = platform_get_drvdata(pdev);
> - int irq = platform_get_irq(pdev, 0);
>
> - free_irq(irq, pwr);
> input_unregister_device(pwr);

You need convert the driver to use devm_input_allocate_device()
first. Otherwise driver will crash the kernel here if you get interrupt
after unregistering the device.

A.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/




== 4 of 7 ==
Date: Wed, Oct 23 2013 9:50 am
From: Sebastian Reichel


Hi,

This is the third iteration of DT support for the TWL4030
power button.

Changes since v2 [0]:
* add devicetree binding documentation
* use devm_input_allocate_device

[0] https://lkml.org/lkml/2013/10/23/323

-- Sebastian

Sebastian Reichel (3):
Input: twl4030-pwrbutton - add device tree support
Input: twl4030-pwrbutton: use dev_err for errors
Input: twl4030-pwrbutton: simplify driver using devm_*

.../bindings/input/twl4030-pwrbutton.txt | 13 ++++++++
drivers/input/misc/twl4030-pwrbutton.c | 38 +++++++++++-----------
2 files changed, 32 insertions(+), 19 deletions(-)
create mode 100644 Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt

--
1.8.4.rc3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/




== 5 of 7 ==
Date: Wed, Oct 23 2013 9:50 am
From: Sebastian Reichel


Use managed irq resource to simplify the driver.

Signed-off-by: Sebastian Reichel <sre@debian.org>
---
drivers/input/misc/twl4030-pwrbutton.c | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
index 3efbb13..91bb497 100644
--- a/drivers/input/misc/twl4030-pwrbutton.c
+++ b/drivers/input/misc/twl4030-pwrbutton.c
@@ -58,7 +58,7 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev)
int irq = platform_get_irq(pdev, 0);
int err;

- pwr = input_allocate_device();
+ pwr = devm_input_allocate_device(&pdev->dev);
if (!pwr) {
dev_err(&pdev->dev, "Can't allocate power button\n");
return -ENOMEM;
@@ -70,37 +70,29 @@ static int twl4030_pwrbutton_probe(struct platform_device *pdev)
pwr->phys = "twl4030_pwrbutton/input0";
pwr->dev.parent = &pdev->dev;

- err = request_threaded_irq(irq, NULL, powerbutton_irq,
+ err = devm_request_threaded_irq(&pwr->dev, irq, NULL, powerbutton_irq,
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
"twl4030_pwrbutton", pwr);
if (err < 0) {
dev_err(&pdev->dev, "Can't get IRQ for pwrbutton: %d\n", err);
- goto free_input_dev;
+ return err;
}

err = input_register_device(pwr);
if (err) {
dev_err(&pdev->dev, "Can't register power button: %d\n", err);
- goto free_irq;
+ return err;
}

platform_set_drvdata(pdev, pwr);

return 0;
-
-free_irq:
- free_irq(irq, pwr);
-free_input_dev:
- input_free_device(pwr);
- return err;
}

static int __exit twl4030_pwrbutton_remove(struct platform_device *pdev)
{
struct input_dev *pwr = platform_get_drvdata(pdev);
- int irq = platform_get_irq(pdev, 0);

- free_irq(irq, pwr);
input_unregister_device(pwr);

return 0;
--
1.8.4.rc3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/




== 6 of 7 ==
Date: Wed, Oct 23 2013 9:50 am
From: Sebastian Reichel


Add device tree support for twl4030 power button driver.

Signed-off-by: Sebastian Reichel <sre@debian.org>
---
.../devicetree/bindings/input/twl4030-pwrbutton.txt | 13 +++++++++++++
drivers/input/misc/twl4030-pwrbutton.c | 16 ++++++++++++----
2 files changed, 25 insertions(+), 4 deletions(-)
create mode 100644 Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt

diff --git a/Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt b/Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt
new file mode 100644
index 0000000..945ec74
--- /dev/null
+++ b/Documentation/devicetree/bindings/input/twl4030-pwrbutton.txt
@@ -0,0 +1,13 @@
+* TWL4030's pwrbutton device tree bindings
+
+Required SoC Specific Properties:
+- compatible: should be one of the following
+ - "ti,twl4030-pwrbutton": For controllers compatible with twl4030
+- interrupt: should be one of the following
+ - <8>: For controllers compatible with twl4030
+
+Example:
+ twl_pwrbutton: pwrbutton {
+ compatible = "ti,twl4030-pwrbutton";
+ interrupts = <8>;
+ };
diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
index b9a05fd..a3a0fe3 100644
--- a/drivers/input/misc/twl4030-pwrbutton.c
+++ b/drivers/input/misc/twl4030-pwrbutton.c
@@ -52,7 +52,7 @@ static irqreturn_t powerbutton_irq(int irq, void *_pwr)
return IRQ_HANDLED;
}

-static int __init twl4030_pwrbutton_probe(struct platform_device *pdev)
+static int twl4030_pwrbutton_probe(struct platform_device *pdev)
{
struct input_dev *pwr;
int irq = platform_get_irq(pdev, 0);
@@ -106,16 +106,24 @@ static int __exit twl4030_pwrbutton_remove(struct platform_device *pdev)
return 0;
}

+#if IS_ENABLED(CONFIG_OF)
+static const struct of_device_id twl4030_pwrbutton_dt_match_table[] = {
+ { .compatible = "ti,twl4030-pwrbutton" },
+ {},
+};
+MODULE_DEVICE_TABLE(of, twl4030_pwrbutton_dt_match_table);
+

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate