lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADscph3VdmG4UQF+6=2jDR3DtStR+f=zsaOURSXH_U4RMp0ntQ@mail.gmail.com>
Date:   Wed, 9 Nov 2016 12:10:20 +0100
From:   Daniel Martin <consume.noise@...il.com>
To:     Lyude <lyude@...hat.com>
Cc:     ibm-acpi-devel@...ts.sourceforge.net,
        Henrique de Moraes Holschuh <ibm-acpi@....eng.br>,
        Darren Hart <dvhart@...radead.org>,
        platform-driver-x86@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/3] thinkpad_acpi: Move tablet detection into separate function

Sorry, I didn't had the time to look at the patches earlier.

Now, I did and was wondering why hotkey_tablet_mode doesn't show up in
sysfs anymore ...

On 7 November 2016 at 18:10, Lyude <lyude@...hat.com> wrote:
> @@ -3464,17 +3495,6 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
>                 res = add_to_attr_set(hotkey_dev_attributes,
>                                 &dev_attr_hotkey_radio_sw.attr);
>
> -       /* For X41t, X60t, X61t Tablets... */
> -       if (!res && acpi_evalf(hkey_handle, &status, "MHKG", "qd")) {
> -               tp_features.hotkey_tablet = 1;
> -               tabletsw_state = !!(status & TP_HOTKEY_TABLET_MASK);
> -               pr_info("possible tablet mode switch found; "
> -                       "ThinkPad in %s mode\n",
> -                       (tabletsw_state) ? "tablet" : "laptop");
> -               res = add_to_attr_set(hotkey_dev_attributes,
> -                               &dev_attr_hotkey_tablet_mode.attr);
> -       }
> -
>         if (!res)
>                 res = register_attr_set_with_sysfs(
>                                 hotkey_dev_attributes,
> @@ -3482,6 +3502,12 @@ static int __init hotkey_init(struct ibm_init_struct *iibm)
>         if (res)
>                 goto err_exit;
>
> +       res = hotkey_init_tablet_mode();
> +       if (res < 0)
> +               goto err_exit;
> +
> +       tabletsw_state = res;
> +
>         /* Set up key map */
>         hotkey_keycode_map = kmalloc(TPACPI_HOTKEY_MAP_SIZE,
>                                         GFP_KERNEL);
> --
> 2.7.4
>

This block has to be before register_attr_set_with_sysfs().

With that fixed and a small patch (will be sent soon) on top it works
on my Yoga 260, so:
Tested-by: Daniel Martin <consume.noise@...il.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ