linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Olof Johansson <olof@lixom.net>, Arnd Bergmann <arnd@arndb.de>,
	<linux-arm-kernel@lists.infradead.org>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Thomas Abraham <thomas.abraham@linaro.org>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: linux-next: manual merge of the input tree with the arm-soc tree
Date: Tue, 3 Jan 2012 14:33:04 +1100	[thread overview]
Message-ID: <20120103143304.eeeaf5e11021721fd02dbce8@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 3885 bytes --]

Hi Dmitry,

Today's linux-next merge of the input tree got a conflict in
drivers/input/keyboard/samsung-keypad.c between commit b3d6ac3e5f93
("input: samsung-keypad: Add device tree support") from the arm-soc tree
and commit 48c98b1bb85a ("Input: samsung-keypad - implement runtime power
management support") from the input tree.

I fixed it up (see below) and can carry the fix as necessary.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc drivers/input/keyboard/samsung-keypad.c
index 8a0060c,b746fce..0000000
--- a/drivers/input/keyboard/samsung-keypad.c
+++ b/drivers/input/keyboard/samsung-keypad.c
@@@ -20,11 -20,11 +20,13 @@@
  #include <linux/io.h>
  #include <linux/module.h>
  #include <linux/platform_device.h>
+ #include <linux/pm.h>
+ #include <linux/pm_runtime.h>
  #include <linux/slab.h>
 +#include <linux/of.h>
 +#include <linux/of_gpio.h>
  #include <linux/sched.h>
- #include <plat/keypad.h>
+ #include <linux/input/samsung-keypad.h>
  
  #define SAMSUNG_KEYIFCON			0x00
  #define SAMSUNG_KEYIFSTSCLR			0x04
@@@ -69,8 -70,8 +72,9 @@@ struct samsung_keypad 
  	void __iomem *base;
  	wait_queue_head_t wait;
  	bool stopped;
+ 	bool wake_enabled;
  	int irq;
 +	enum samsung_keypad_type type;
  	unsigned int row_shift;
  	unsigned int rows;
  	unsigned int cols;
@@@ -421,18 -318,9 +438,19 @@@ static int __devinit samsung_keypad_pro
  	keypad->row_shift = row_shift;
  	keypad->rows = pdata->rows;
  	keypad->cols = pdata->cols;
+ 	keypad->stopped = true;
  	init_waitqueue_head(&keypad->wait);
  
 +	if (pdev->dev.of_node) {
 +#ifdef CONFIG_OF
 +		samsung_keypad_parse_dt_gpio(&pdev->dev, keypad);
 +		keypad->type = of_device_is_compatible(pdev->dev.of_node,
 +					"samsung,s5pv210-keypad");
 +#endif
 +	} else {
 +		keypad->type = platform_get_device_id(pdev)->driver_data;
 +	}
 +
  	input_dev->name = pdev->name;
  	input_dev->id.bustype = BUS_HOST;
  	input_dev->dev.parent = &pdev->dev;
@@@ -471,21 -363,15 +493,21 @@@
  	if (error)
  		goto err_free_irq;
  
- 	device_init_wakeup(&pdev->dev, pdata->wakeup);
- 	platform_set_drvdata(pdev, keypad);
- 
 +	if (pdev->dev.of_node) {
 +		devm_kfree(&pdev->dev, (void *)pdata->keymap_data->keymap);
 +		devm_kfree(&pdev->dev, (void *)pdata->keymap_data);
 +		devm_kfree(&pdev->dev, (void *)pdata);
 +	}
  	return 0;
  
  err_free_irq:
  	free_irq(keypad->irq, keypad);
+ 	pm_runtime_disable(&pdev->dev);
+ 	device_init_wakeup(&pdev->dev, 0);
+ 	platform_set_drvdata(pdev, NULL);
  err_put_clk:
  	clk_put(keypad->clk);
 +	samsung_keypad_dt_gpio_free(keypad);
  err_unmap_base:
  	iounmap(keypad->base);
  err_free_mem:
@@@ -578,24 -510,14 +647,25 @@@ static int samsung_keypad_resume(struc
  
  	return 0;
  }
+ #endif
  
  static const struct dev_pm_ops samsung_keypad_pm_ops = {
- 	.suspend	= samsung_keypad_suspend,
- 	.resume		= samsung_keypad_resume,
+ 	SET_SYSTEM_SLEEP_PM_OPS(samsung_keypad_suspend, samsung_keypad_resume)
+ 	SET_RUNTIME_PM_OPS(samsung_keypad_runtime_suspend,
+ 			   samsung_keypad_runtime_resume, NULL)
  };
- #endif
  
 +#ifdef CONFIG_OF
 +static const struct of_device_id samsung_keypad_dt_match[] = {
 +	{ .compatible = "samsung,s3c6410-keypad" },
 +	{ .compatible = "samsung,s5pv210-keypad" },
 +	{},
 +};
 +MODULE_DEVICE_TABLE(of, samsung_keypad_dt_match);
 +#else
 +#define samsung_keypad_dt_match NULL
 +#endif
 +
  static struct platform_device_id samsung_keypad_driver_ids[] = {
  	{
  		.name		= "samsung-keypad",
@@@ -614,10 -536,7 +684,8 @@@ static struct platform_driver samsung_k
  	.driver		= {
  		.name	= "samsung-keypad",
  		.owner	= THIS_MODULE,
 +		.of_match_table = samsung_keypad_dt_match,
- #ifdef CONFIG_PM
  		.pm	= &samsung_keypad_pm_ops,
- #endif
  	},
  	.id_table	= samsung_keypad_driver_ids,
  };

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

             reply	other threads:[~2012-01-03  3:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-03  3:33 Stephen Rothwell [this message]
2019-05-01  3:40 linux-next: manual merge of the input tree with the arm-soc tree Stephen Rothwell
2019-05-12 23:28 ` Stephen Rothwell
2020-10-06  5:06 Stephen Rothwell
2023-01-11 23:39 Stephen Rothwell
2023-02-21 22:10 ` Stephen Rothwell

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=20120103143304.eeeaf5e11021721fd02dbce8@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=arnd@arndb.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=thomas.abraham@linaro.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;
as well as URLs for NNTP newsgroup(s).