Re: [PATCH] Add Panasonic Laptop ACPI extras driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Harald,

On Wed, Jul 23, 2008 at 07:53:07AM -0400, Harald Welte wrote:
> Hi Dmitry, 
> 
> thanks for your valuable feedback and sorry for not including
> you into the loop earlier.
> 
> This is a new version of the patch including all your feedback.
> 
> Andi, I hope we're clear to merge it now.
>

Just couple more things after your last round of fixes. If these are
corrected you may add:

Acked-by: Dmitry Torokhov <dtro@xxxxxxx>

 
> +
> +static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc)
[..skip..]
> +
> +	key_code = pcc->keymap[hkey_num];
> +
> +	if (key_code != -1) {

This should be either KEY_RESERVED now or just remove the check
completely - since you reset the bit for KEY_RESERVED in the keybit
the input core will not propagate this event even if reported.

> +		int pushed = (result & 0x80) ? TRUE : FALSE;
> +
> +		input_report_key(hotk_input_dev, key_code, pushed);
> +		input_sync(hotk_input_dev);
> +	}
> +
> +}
[..skip..]
> +static int acpi_pcc_init_input(struct pcc_acpi *pcc)
> +{
> +	int i, rc;
> +
> +	ACPI_FUNCTION_TRACE("acpi_pcc_init_input");
> +
> +	pcc->input_dev = input_allocate_device();
> +	if (!pcc->input_dev) {
> +		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
> +				  "Couldn't allocate input device for hotkey"));
> +		return -ENOMEM;
> +	}
> +
> +	pcc->input_dev->evbit[0] = BIT(EV_KEY);
> +
> +	for (i = 0; i < sizeof(pcc->keymap); i++)
> +		__set_bit(pcc->keymap[i], pcc->input_dev->keybit);
> +	__clear_bit(KEY_RESERVED, pcc->input_dev->keybit);
> +

This should be done after copying the initial keymap, otherwise you
won't really set any bits because pcc is zeroed upon allocation.

> +	pcc->input_dev->name = ACPI_PCC_DRIVER_NAME;
> +	pcc->input_dev->phys = ACPI_PCC_INPUT_PHYS;
> +	pcc->input_dev->id.bustype = BUS_HOST;
> +	pcc->input_dev->id.vendor = 0x0001;
> +	pcc->input_dev->id.product = 0x0001;
> +	pcc->input_dev->id.version = 0x0100;
> +	pcc->input_dev->getkeycode = pcc_getkeycode;
> +	pcc->input_dev->setkeycode = pcc_setkeycode;
> +
> +	/* load initial keymap */
> +	memcpy(pcc->keymap, initial_keymap, sizeof(pcc->keymap));
> +

Thanks!

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux