LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/7] spi: Merge probe and probe_id callbacks
From: Anton Vorontsov @ 2009-07-29 17:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Brownell, linux-kernel, lm-sensors, linuxppc-dev, linux-mtd,
	Jean Delvare, David Woodhouse
In-Reply-To: <20090729170345.GA26787@oksana.dev.rtsoft.ru>

The probe_id callback was introduced for the transition period
as a "new-style" probe hook. This patch makes probe() look exactly
as probe_id(), converts drivers and removes probe_id().

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 drivers/gpio/max7301.c                 |    3 ++-
 drivers/gpio/mcp23s08.c                |    3 ++-
 drivers/hwmon/adcxx.c                  |   12 ++++++++----
 drivers/hwmon/lis3lv02d_spi.c          |    3 ++-
 drivers/hwmon/lm70.c                   |    6 ++++--
 drivers/hwmon/max1111.c                |    3 ++-
 drivers/input/touchscreen/ad7877.c     |    3 ++-
 drivers/input/touchscreen/ad7879.c     |    3 ++-
 drivers/input/touchscreen/ads7846.c    |    3 ++-
 drivers/leds/leds-dac124s085.c         |    3 ++-
 drivers/mfd/ezx-pcap.c                 |    3 ++-
 drivers/misc/eeprom/at25.c             |    2 +-
 drivers/mmc/host/mmc_spi.c             |    3 ++-
 drivers/mtd/devices/m25p80.c           |    2 +-
 drivers/mtd/devices/mtd_dataflash.c    |    3 ++-
 drivers/net/enc28j60.c                 |    3 ++-
 drivers/net/ks8851.c                   |    3 ++-
 drivers/net/wireless/libertas/if_spi.c |    3 ++-
 drivers/net/wireless/p54/p54spi.c      |    3 ++-
 drivers/net/wireless/wl12xx/main.c     |    3 ++-
 drivers/rtc/rtc-ds1305.c               |    3 ++-
 drivers/rtc/rtc-ds1390.c               |    3 ++-
 drivers/rtc/rtc-ds3234.c               |    3 ++-
 drivers/rtc/rtc-m41t94.c               |    3 ++-
 drivers/rtc/rtc-max6902.c              |    3 ++-
 drivers/rtc/rtc-r9701.c                |    3 ++-
 drivers/rtc/rtc-rs5c348.c              |    3 ++-
 drivers/serial/max3100.c               |    3 ++-
 drivers/spi/spi.c                      |   15 +++------------
 drivers/spi/spidev.c                   |    2 +-
 drivers/spi/tle62x0.c                  |    3 ++-
 drivers/staging/stlc45xx/stlc45xx.c    |    3 ++-
 drivers/video/backlight/corgi_lcd.c    |    3 ++-
 drivers/video/backlight/ltv350qv.c     |    3 ++-
 drivers/video/backlight/tdo24m.c       |    3 ++-
 drivers/video/backlight/tosa_lcd.c     |    3 ++-
 drivers/video/backlight/vgg2432a4.c    |    3 ++-
 include/linux/spi/spi.h                |    6 ++----
 38 files changed, 82 insertions(+), 56 deletions(-)

diff --git a/drivers/gpio/max7301.c b/drivers/gpio/max7301.c
index 480956f..c92cff6 100644
--- a/drivers/gpio/max7301.c
+++ b/drivers/gpio/max7301.c
@@ -210,7 +210,8 @@ static void max7301_set(struct gpio_chip *chip, unsigned offset, int value)
 	mutex_unlock(&ts->lock);
 }
 
-static int __devinit max7301_probe(struct spi_device *spi)
+static int __devinit max7301_probe(struct spi_device *spi,
+				   const struct spi_device_id *id)
 {
 	struct max7301 *ts;
 	struct max7301_platform_data *pdata;
diff --git a/drivers/gpio/mcp23s08.c b/drivers/gpio/mcp23s08.c
index c6c7aa1..2a99eea 100644
--- a/drivers/gpio/mcp23s08.c
+++ b/drivers/gpio/mcp23s08.c
@@ -300,7 +300,8 @@ fail:
 	return status;
 }
 
-static int mcp23s08_probe(struct spi_device *spi)
+static int mcp23s08_probe(struct spi_device *spi,
+			  const struct spi_device_id *id)
 {
 	struct mcp23s08_platform_data	*pdata;
 	unsigned			addr;
diff --git a/drivers/hwmon/adcxx.c b/drivers/hwmon/adcxx.c
index 7a89fba..b01c0d5 100644
--- a/drivers/hwmon/adcxx.c
+++ b/drivers/hwmon/adcxx.c
@@ -204,22 +204,26 @@ out_err:
 	return status;
 }
 
-static int __devinit adcxx1s_probe(struct spi_device *spi)
+static int __devinit adcxx1s_probe(struct spi_device *spi,
+				   const struct spi_device_id *id)
 {
 	return adcxx_probe(spi, 1);
 }
 
-static int __devinit adcxx2s_probe(struct spi_device *spi)
+static int __devinit adcxx2s_probe(struct spi_device *spi,
+				   const struct spi_device_id *id)
 {
 	return adcxx_probe(spi, 2);
 }
 
-static int __devinit adcxx4s_probe(struct spi_device *spi)
+static int __devinit adcxx4s_probe(struct spi_device *spi,
+				   const struct spi_device_id *id)
 {
 	return adcxx_probe(spi, 4);
 }
 
-static int __devinit adcxx8s_probe(struct spi_device *spi)
+static int __devinit adcxx8s_probe(struct spi_device *spi,
+				   const struct spi_device_id *id)
 {
 	return adcxx_probe(spi, 8);
 }
diff --git a/drivers/hwmon/lis3lv02d_spi.c b/drivers/hwmon/lis3lv02d_spi.c
index b7aed07..478b1d4 100644
--- a/drivers/hwmon/lis3lv02d_spi.c
+++ b/drivers/hwmon/lis3lv02d_spi.c
@@ -56,7 +56,8 @@ static int lis3_spi_init(struct lis3lv02d *lis3)
 
 static struct axis_conversion lis3lv02d_axis_normal = { 1, 2, 3 };
 
-static int __devinit lis302dl_spi_probe(struct spi_device *spi)
+static int __devinit lis302dl_spi_probe(struct spi_device *spi,
+					const struct spi_device_id *id)
 {
 	int ret;
 
diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c
index d55cc7c..3953c22 100644
--- a/drivers/hwmon/lm70.c
+++ b/drivers/hwmon/lm70.c
@@ -170,7 +170,8 @@ out_dev_reg_failed:
 	return status;
 }
 
-static int __devinit lm70_probe(struct spi_device *spi)
+static int __devinit lm70_probe(struct spi_device *spi,
+				const struct spi_device_id *id)
 {
 	/* signaling is SPI_MODE_0 on a 3-wire link (shared SI/SO) */
 	if ((spi->mode & (SPI_CPOL | SPI_CPHA)) || !(spi->mode & SPI_3WIRE))
@@ -179,7 +180,8 @@ static int __devinit lm70_probe(struct spi_device *spi)
 	return common_probe(spi, LM70_CHIP_LM70);
 }
 
-static int __devinit tmp121_probe(struct spi_device *spi)
+static int __devinit tmp121_probe(struct spi_device *spi,
+				  const struct spi_device_id *id)
 {
 	/* signaling is SPI_MODE_0 with only MISO connected */
 	if (spi->mode & (SPI_CPOL | SPI_CPHA))
diff --git a/drivers/hwmon/max1111.c b/drivers/hwmon/max1111.c
index 9ac4972..df0ce3b 100644
--- a/drivers/hwmon/max1111.c
+++ b/drivers/hwmon/max1111.c
@@ -154,7 +154,8 @@ static int setup_transfer(struct max1111_data *data)
 	return 0;
 }
 
-static int __devinit max1111_probe(struct spi_device *spi)
+static int __devinit max1111_probe(struct spi_device *spi,
+				   const struct spi_device_id *id)
 {
 	struct max1111_data *data;
 	int err;
diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c
index eb83939..8b44d87 100644
--- a/drivers/input/touchscreen/ad7877.c
+++ b/drivers/input/touchscreen/ad7877.c
@@ -646,7 +646,8 @@ static void ad7877_setup_ts_def_msg(struct spi_device *spi, struct ad7877 *ts)
 	}
 }
 
-static int __devinit ad7877_probe(struct spi_device *spi)
+static int __devinit ad7877_probe(struct spi_device *spi,
+				  const struct spi_device_id *id)
 {
 	struct ad7877			*ts;
 	struct input_dev		*input_dev;
diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c
index 19b4db7..aee8a94 100644
--- a/drivers/input/touchscreen/ad7879.c
+++ b/drivers/input/touchscreen/ad7879.c
@@ -618,7 +618,8 @@ static void ad7879_setup_ts_def_msg(struct ad7879 *ts)
 	}
 }
 
-static int __devinit ad7879_probe(struct spi_device *spi)
+static int __devinit ad7879_probe(struct spi_device *spi,
+				  const struct spi_device_id *id)
 {
 	struct ad7879 *ts;
 	int error;
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 09c8109..eb12b09 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -872,7 +872,8 @@ static int __devinit setup_pendown(struct spi_device *spi, struct ads7846 *ts)
 	return 0;
 }
 
-static int __devinit ads7846_probe(struct spi_device *spi)
+static int __devinit ads7846_probe(struct spi_device *spi,
+				   const struct spi_device_id *id)
 {
 	struct ads7846			*ts;
 	struct ads7846_packet		*packet;
diff --git a/drivers/leds/leds-dac124s085.c b/drivers/leds/leds-dac124s085.c
index 2913d76..d6430d9 100644
--- a/drivers/leds/leds-dac124s085.c
+++ b/drivers/leds/leds-dac124s085.c
@@ -64,7 +64,8 @@ static void dac124s085_set_brightness(struct led_classdev *ldev,
 	spin_unlock(&led->lock);
 }
 
-static int dac124s085_probe(struct spi_device *spi)
+static int dac124s085_probe(struct spi_device *spi,
+			    const struct spi_device_id *id)
 {
 	struct dac124s085	*dac;
 	struct dac124s085_led	*led;
diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index 1672f30..a658452 100644
--- a/drivers/mfd/ezx-pcap.c
+++ b/drivers/mfd/ezx-pcap.c
@@ -378,7 +378,8 @@ static int __devexit ezx_pcap_remove(struct spi_device *spi)
 	return 0;
 }
 
-static int __devinit ezx_pcap_probe(struct spi_device *spi)
+static int __devinit ezx_pcap_probe(struct spi_device *spi,
+				    const struct spi_device_id *id)
 {
 	struct pcap_platform_data *pdata = spi->dev.platform_data;
 	struct pcap_chip *pcap;
diff --git a/drivers/misc/eeprom/at25.c b/drivers/misc/eeprom/at25.c
index d564de0..39a36f3 100644
--- a/drivers/misc/eeprom/at25.c
+++ b/drivers/misc/eeprom/at25.c
@@ -287,7 +287,7 @@ static ssize_t at25_mem_write(struct memory_accessor *mem, const char *buf,
 
 /*-------------------------------------------------------------------------*/
 
-static int at25_probe(struct spi_device *spi)
+static int at25_probe(struct spi_device *spi, const struct spi_device_id *id)
 {
 	struct at25_data	*at25 = NULL;
 	const struct spi_eeprom *chip;
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index d55fe4f..0ebc11c 100644
--- a/drivers/mmc/host/mmc_spi.c
+++ b/drivers/mmc/host/mmc_spi.c
@@ -1306,7 +1306,8 @@ static int maybe_count_child(struct device *dev, void *c)
 	return 0;
 }
 
-static int mmc_spi_probe(struct spi_device *spi)
+static int mmc_spi_probe(struct spi_device *spi,
+			 const struct spi_device_id *id)
 {
 	void			*ones;
 	struct mmc_host		*mmc;
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 7c3efff..74181c7 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -782,7 +782,7 @@ static struct spi_driver m25p80_driver = {
 		.owner	= THIS_MODULE,
 	},
 	.id_table	= m25p_ids,
-	.probe_id	= m25p_probe,
+	.probe		= m25p_probe,
 	.remove	= __devexit_p(m25p_remove),
 
 	/* REVISIT: many of these chips have deep power-down modes, which
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 211c27a..6b242a0 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -847,7 +847,8 @@ static struct flash_info *__devinit jedec_probe(struct spi_device *spi)
  *   AT45DB0642  64Mbit  (8M)    xx111xxx (0x3c)   8192   1056     11
  *   AT45DB1282  128Mbit (16M)   xx0100xx (0x10)  16384   1056     11
  */
-static int __devinit dataflash_probe(struct spi_device *spi)
+static int __devinit dataflash_probe(struct spi_device *spi,
+				     const struct spi_device_id *id)
 {
 	int status;
 	struct flash_info	*info;
diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c
index c709571..883d14f 100644
--- a/drivers/net/enc28j60.c
+++ b/drivers/net/enc28j60.c
@@ -1542,7 +1542,8 @@ static const struct net_device_ops enc28j60_netdev_ops = {
 	.ndo_validate_addr	= eth_validate_addr,
 };
 
-static int __devinit enc28j60_probe(struct spi_device *spi)
+static int __devinit enc28j60_probe(struct spi_device *spi,
+				    const struct spi_device_id *id)
 {
 	struct net_device *dev;
 	struct enc28j60_net *priv;
diff --git a/drivers/net/ks8851.c b/drivers/net/ks8851.c
index fe7cf4f..9bbbedd 100644
--- a/drivers/net/ks8851.c
+++ b/drivers/net/ks8851.c
@@ -1176,7 +1176,8 @@ static int ks8851_read_selftest(struct ks8851_net *ks)
 
 /* driver bus management functions */
 
-static int __devinit ks8851_probe(struct spi_device *spi)
+static int __devinit ks8851_probe(struct spi_device *spi,
+				  const struct spi_device_id *id)
 {
 	struct net_device *ndev;
 	struct ks8851_net *ks;
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index ea45765..4961b3a 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -1027,7 +1027,8 @@ static int if_spi_calculate_fw_names(u16 card_id,
 	return 0;
 }
 
-static int __devinit if_spi_probe(struct spi_device *spi)
+static int __devinit if_spi_probe(struct spi_device *spi,
+				  const struct spi_device_id *id)
 {
 	struct if_spi_card *card;
 	struct lbs_private *priv = NULL;
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
index 63bcdd1..e7f1ff2 100644
--- a/drivers/net/wireless/p54/p54spi.c
+++ b/drivers/net/wireless/p54/p54spi.c
@@ -627,7 +627,8 @@ static void p54spi_op_stop(struct ieee80211_hw *dev)
 	mutex_unlock(&priv->mutex);
 }
 
-static int __devinit p54spi_probe(struct spi_device *spi)
+static int __devinit p54spi_probe(struct spi_device *spi,
+				  const struct spi_device_id *id)
 {
 	struct p54s_priv *priv = NULL;
 	struct ieee80211_hw *hw;
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 6416406..66c3a91 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1171,7 +1171,8 @@ static int wl12xx_init_ieee80211(struct wl12xx *wl)
 }
 
 #define WL12XX_DEFAULT_CHANNEL 1
-static int __devinit wl12xx_probe(struct spi_device *spi)
+static int __devinit wl12xx_probe(struct spi_device *spi,
+				  const struct spi_device_id *id)
 {
 	struct wl12xx_platform_data *pdata;
 	struct ieee80211_hw *hw;
diff --git a/drivers/rtc/rtc-ds1305.c b/drivers/rtc/rtc-ds1305.c
index 2736b11..4ce04db 100644
--- a/drivers/rtc/rtc-ds1305.c
+++ b/drivers/rtc/rtc-ds1305.c
@@ -614,7 +614,8 @@ static struct bin_attribute nvram = {
  * Interface to SPI stack
  */
 
-static int __devinit ds1305_probe(struct spi_device *spi)
+static int __devinit ds1305_probe(struct spi_device *spi,
+				  const struct spi_device_id *id)
 {
 	struct ds1305			*ds1305;
 	struct rtc_device		*rtc;
diff --git a/drivers/rtc/rtc-ds1390.c b/drivers/rtc/rtc-ds1390.c
index cdb7050..f18df86 100644
--- a/drivers/rtc/rtc-ds1390.c
+++ b/drivers/rtc/rtc-ds1390.c
@@ -120,7 +120,8 @@ static const struct rtc_class_ops ds1390_rtc_ops = {
 	.set_time	= ds1390_set_time,
 };
 
-static int __devinit ds1390_probe(struct spi_device *spi)
+static int __devinit ds1390_probe(struct spi_device *spi,
+				  const struct spi_device_id *id)
 {
 	unsigned char tmp;
 	struct ds1390 *chip;
diff --git a/drivers/rtc/rtc-ds3234.c b/drivers/rtc/rtc-ds3234.c
index a774ca3..b8107eb 100644
--- a/drivers/rtc/rtc-ds3234.c
+++ b/drivers/rtc/rtc-ds3234.c
@@ -105,7 +105,8 @@ static const struct rtc_class_ops ds3234_rtc_ops = {
 	.set_time	= ds3234_set_time,
 };
 
-static int __devinit ds3234_probe(struct spi_device *spi)
+static int __devinit ds3234_probe(struct spi_device *spi,
+				  const struct spi_device_id *id)
 {
 	struct rtc_device *rtc;
 	unsigned char tmp;
diff --git a/drivers/rtc/rtc-m41t94.c b/drivers/rtc/rtc-m41t94.c
index c8c97a4..87d6349 100644
--- a/drivers/rtc/rtc-m41t94.c
+++ b/drivers/rtc/rtc-m41t94.c
@@ -110,7 +110,8 @@ static const struct rtc_class_ops m41t94_rtc_ops = {
 
 static struct spi_driver m41t94_driver;
 
-static int __devinit m41t94_probe(struct spi_device *spi)
+static int __devinit m41t94_probe(struct spi_device *spi,
+				  const struct spi_device_id *id)
 {
 	struct rtc_device *rtc;
 	int res;
diff --git a/drivers/rtc/rtc-max6902.c b/drivers/rtc/rtc-max6902.c
index 657403e..95197f0 100644
--- a/drivers/rtc/rtc-max6902.c
+++ b/drivers/rtc/rtc-max6902.c
@@ -120,7 +120,8 @@ static const struct rtc_class_ops max6902_rtc_ops = {
 	.set_time	= max6902_set_time,
 };
 
-static int __devinit max6902_probe(struct spi_device *spi)
+static int __devinit max6902_probe(struct spi_device *spi,
+				   const struct spi_device_id *id)
 {
 	struct rtc_device *rtc;
 	unsigned char tmp;
diff --git a/drivers/rtc/rtc-r9701.c b/drivers/rtc/rtc-r9701.c
index 9beba49..a337c71 100644
--- a/drivers/rtc/rtc-r9701.c
+++ b/drivers/rtc/rtc-r9701.c
@@ -119,7 +119,8 @@ static const struct rtc_class_ops r9701_rtc_ops = {
 	.set_time	= r9701_set_datetime,
 };
 
-static int __devinit r9701_probe(struct spi_device *spi)
+static int __devinit r9701_probe(struct spi_device *spi,
+				 const struct spi_device_id *id)
 {
 	struct rtc_device *rtc;
 	unsigned char tmp;
diff --git a/drivers/rtc/rtc-rs5c348.c b/drivers/rtc/rtc-rs5c348.c
index 2099037..ffd3fa4 100644
--- a/drivers/rtc/rtc-rs5c348.c
+++ b/drivers/rtc/rtc-rs5c348.c
@@ -147,7 +147,8 @@ static const struct rtc_class_ops rs5c348_rtc_ops = {
 
 static struct spi_driver rs5c348_driver;
 
-static int __devinit rs5c348_probe(struct spi_device *spi)
+static int __devinit rs5c348_probe(struct spi_device *spi,
+				   const struct spi_device_id *id)
 {
 	int ret;
 	struct rtc_device *rtc;
diff --git a/drivers/serial/max3100.c b/drivers/serial/max3100.c
index 05d36e2..4b043f3 100644
--- a/drivers/serial/max3100.c
+++ b/drivers/serial/max3100.c
@@ -741,7 +741,8 @@ static struct uart_driver max3100_uart_driver = {
 };
 static int uart_driver_registered;
 
-static int __devinit max3100_probe(struct spi_device *spi)
+static int __devinit max3100_probe(struct spi_device *spi,
+				   const struct spi_device_id *id)
 {
 	int i, retval;
 	struct plat_max3100 *pdata;
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index a3c9804..f05e272 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -137,19 +137,12 @@ struct bus_type spi_bus_type = {
 };
 EXPORT_SYMBOL_GPL(spi_bus_type);
 
-static int spi_drv_probe_id(struct device *dev)
-{
-	const struct spi_driver		*sdrv = to_spi_driver(dev->driver);
-	struct spi_device		*sdev = to_spi_device(dev);
-
-	return sdrv->probe_id(sdev, spi_match_id(sdrv->id_table, sdev));
-}
-
 static int spi_drv_probe(struct device *dev)
 {
 	const struct spi_driver		*sdrv = to_spi_driver(dev->driver);
+	struct spi_device		*sdev = to_spi_device(dev);
 
-	return sdrv->probe(to_spi_device(dev));
+	return sdrv->probe(sdev, spi_match_id(sdrv->id_table, sdev));
 }
 
 static int spi_drv_remove(struct device *dev)
@@ -174,9 +167,7 @@ static void spi_drv_shutdown(struct device *dev)
 int spi_register_driver(struct spi_driver *sdrv)
 {
 	sdrv->driver.bus = &spi_bus_type;
-	if (sdrv->probe_id)
-		sdrv->driver.probe = spi_drv_probe_id;
-	else if (sdrv->probe)
+	if (sdrv->probe)
 		sdrv->driver.probe = spi_drv_probe;
 	if (sdrv->remove)
 		sdrv->driver.remove = spi_drv_remove;
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index f921bd1..08b900b 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -561,7 +561,7 @@ static struct class *spidev_class;
 
 /*-------------------------------------------------------------------------*/
 
-static int spidev_probe(struct spi_device *spi)
+static int spidev_probe(struct spi_device *spi, const struct spi_device_id *id)
 {
 	struct spidev_data	*spidev;
 	int			status;
diff --git a/drivers/spi/tle62x0.c b/drivers/spi/tle62x0.c
index bf9540f..a6a181a 100644
--- a/drivers/spi/tle62x0.c
+++ b/drivers/spi/tle62x0.c
@@ -238,7 +238,8 @@ static int to_gpio_num(struct device_attribute *attr)
 	return -1;
 }
 
-static int __devinit tle62x0_probe(struct spi_device *spi)
+static int __devinit tle62x0_probe(struct spi_device *spi,
+				   const struct spi_device_id *id)
 {
 	struct tle62x0_state *st;
 	struct tle62x0_pdata *pdata;
diff --git a/drivers/staging/stlc45xx/stlc45xx.c b/drivers/staging/stlc45xx/stlc45xx.c
index 38d0b24..22c90fa 100644
--- a/drivers/staging/stlc45xx/stlc45xx.c
+++ b/drivers/staging/stlc45xx/stlc45xx.c
@@ -2387,7 +2387,8 @@ static struct platform_device stlc45xx_device = {
 	},
 };
 
-static int __devinit stlc45xx_probe(struct spi_device *spi)
+static int __devinit stlc45xx_probe(struct spi_device *spi,
+				    const struct spi_device_id *id)
 {
 	struct stlc45xx *stlc;
 	struct ieee80211_hw *hw;
diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c
index 2211a85..eb5dced 100644
--- a/drivers/video/backlight/corgi_lcd.c
+++ b/drivers/video/backlight/corgi_lcd.c
@@ -530,7 +530,8 @@ err_free_backlight_on:
 	return err;
 }
 
-static int __devinit corgi_lcd_probe(struct spi_device *spi)
+static int __devinit corgi_lcd_probe(struct spi_device *spi,
+				     const struct spi_device_id *id)
 {
 	struct corgi_lcd_platform_data *pdata = spi->dev.platform_data;
 	struct corgi_lcd *lcd;
diff --git a/drivers/video/backlight/ltv350qv.c b/drivers/video/backlight/ltv350qv.c
index 4631ca8..4970c9f 100644
--- a/drivers/video/backlight/ltv350qv.c
+++ b/drivers/video/backlight/ltv350qv.c
@@ -225,7 +225,8 @@ static struct lcd_ops ltv_ops = {
 	.set_power	= ltv350qv_set_power,
 };
 
-static int __devinit ltv350qv_probe(struct spi_device *spi)
+static int __devinit ltv350qv_probe(struct spi_device *spi,
+				    const struct spi_device_id *id)
 {
 	struct ltv350qv *lcd;
 	struct lcd_device *ld;
diff --git a/drivers/video/backlight/tdo24m.c b/drivers/video/backlight/tdo24m.c
index bbfb502..0a2ab3f 100644
--- a/drivers/video/backlight/tdo24m.c
+++ b/drivers/video/backlight/tdo24m.c
@@ -327,7 +327,8 @@ static struct lcd_ops tdo24m_ops = {
 	.set_mode	= tdo24m_set_mode,
 };
 
-static int __devinit tdo24m_probe(struct spi_device *spi)
+static int __devinit tdo24m_probe(struct spi_device *spi,
+				  const struct spi_device_id *id)
 {
 	struct tdo24m *lcd;
 	struct spi_message *m;
diff --git a/drivers/video/backlight/tosa_lcd.c b/drivers/video/backlight/tosa_lcd.c
index 50ec17d..d8d057e 100644
--- a/drivers/video/backlight/tosa_lcd.c
+++ b/drivers/video/backlight/tosa_lcd.c
@@ -168,7 +168,8 @@ static struct lcd_ops tosa_lcd_ops = {
 	.set_mode = tosa_lcd_set_mode,
 };
 
-static int __devinit tosa_lcd_probe(struct spi_device *spi)
+static int __devinit tosa_lcd_probe(struct spi_device *spi,
+				    const struct spi_device_id *id)
 {
 	int ret;
 	struct tosa_lcd_data *data;
diff --git a/drivers/video/backlight/vgg2432a4.c b/drivers/video/backlight/vgg2432a4.c
index b49063c..3e9cb99 100644
--- a/drivers/video/backlight/vgg2432a4.c
+++ b/drivers/video/backlight/vgg2432a4.c
@@ -227,7 +227,8 @@ static struct ili9320_client vgg2432a4_client = {
 
 /* Device probe */
 
-static int __devinit vgg2432a4_probe(struct spi_device *spi)
+static int __devinit vgg2432a4_probe(struct spi_device *spi,
+				     const struct spi_device_id *id)
 {
 	int ret;
 
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index c8d92a1..fa4ada9 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -147,7 +147,6 @@ struct spi_message;
 /**
  * struct spi_driver - Host side "protocol" driver
  * @id_table: List of SPI devices supported by this driver
- * @probe_id: Binds this driver to the spi device via id_table matching.
  * @probe: Binds this driver to the spi device.  Drivers can verify
  *	that the device is actually present, and may need to configure
  *	characteristics (such as bits_per_word) which weren't needed for
@@ -174,9 +173,8 @@ struct spi_message;
  */
 struct spi_driver {
 	const struct spi_device_id *id_table;
-	int			(*probe_id)(struct spi_device *spi,
-					    const struct spi_device_id *id);
-	int			(*probe)(struct spi_device *spi);
+	int			(*probe)(struct spi_device *spi,
+					 const struct spi_device_id *id);
 	int			(*remove)(struct spi_device *spi);
 	void			(*shutdown)(struct spi_device *spi);
 	int			(*suspend)(struct spi_device *spi, pm_message_t mesg);
-- 
1.6.3.3

^ permalink raw reply related

* [PATCH 6/7] hwmon: adxx: Convert to device table matching
From: Anton Vorontsov @ 2009-07-29 17:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Brownell, linux-kernel, lm-sensors, linuxppc-dev, linux-mtd,
	Jean Delvare, David Woodhouse
In-Reply-To: <20090729170345.GA26787@oksana.dev.rtsoft.ru>

This patch makes the code a little bit nicer, and shorter.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 drivers/hwmon/adcxx.c |  106 ++++++++-----------------------------------------
 1 files changed, 17 insertions(+), 89 deletions(-)

diff --git a/drivers/hwmon/adcxx.c b/drivers/hwmon/adcxx.c
index b01c0d5..6b3b057 100644
--- a/drivers/hwmon/adcxx.c
+++ b/drivers/hwmon/adcxx.c
@@ -43,6 +43,7 @@
 #include <linux/hwmon.h>
 #include <linux/hwmon-sysfs.h>
 #include <linux/mutex.h>
+#include <linux/mod_devicetable.h>
 #include <linux/spi/spi.h>
 
 #define DRVNAME		"adcxx"
@@ -157,8 +158,10 @@ static struct sensor_device_attribute ad_input[] = {
 
 /*----------------------------------------------------------------------*/
 
-static int __devinit adcxx_probe(struct spi_device *spi, int channels)
+static int __devinit adcxx_probe(struct spi_device *spi,
+				 const struct spi_device_id *id)
 {
+	int channels = (int)id->data;
 	struct adcxx *adc;
 	int status;
 	int i;
@@ -204,30 +207,6 @@ out_err:
 	return status;
 }
 
-static int __devinit adcxx1s_probe(struct spi_device *spi,
-				   const struct spi_device_id *id)
-{
-	return adcxx_probe(spi, 1);
-}
-
-static int __devinit adcxx2s_probe(struct spi_device *spi,
-				   const struct spi_device_id *id)
-{
-	return adcxx_probe(spi, 2);
-}
-
-static int __devinit adcxx4s_probe(struct spi_device *spi,
-				   const struct spi_device_id *id)
-{
-	return adcxx_probe(spi, 4);
-}
-
-static int __devinit adcxx8s_probe(struct spi_device *spi,
-				   const struct spi_device_id *id)
-{
-	return adcxx_probe(spi, 8);
-}
-
 static int __devexit adcxx_remove(struct spi_device *spi)
 {
 	struct adcxx *adc = dev_get_drvdata(&spi->dev);
@@ -245,79 +224,33 @@ static int __devexit adcxx_remove(struct spi_device *spi)
 	return 0;
 }
 
-static struct spi_driver adcxx1s_driver = {
-	.driver = {
-		.name	= "adcxx1s",
-		.owner	= THIS_MODULE,
-	},
-	.probe	= adcxx1s_probe,
-	.remove	= __devexit_p(adcxx_remove),
+static const struct spi_device_id adcxx_ids[] = {
+	{ "adcxx1s", (void *)1 },
+	{ "adcxx2s", (void *)2 },
+	{ "adcxx4s", (void *)4 },
+	{ "adcxx8s", (void *)8 },
+	{ },
 };
+MODULE_DEVICE_TABLE(spi, adcxx_ids);
 
-static struct spi_driver adcxx2s_driver = {
+static struct spi_driver adcxx_driver = {
 	.driver = {
-		.name	= "adcxx2s",
+		.name	= "adcxx",
 		.owner	= THIS_MODULE,
 	},
-	.probe	= adcxx2s_probe,
-	.remove	= __devexit_p(adcxx_remove),
-};
-
-static struct spi_driver adcxx4s_driver = {
-	.driver = {
-		.name	= "adcxx4s",
-		.owner	= THIS_MODULE,
-	},
-	.probe	= adcxx4s_probe,
-	.remove	= __devexit_p(adcxx_remove),
-};
-
-static struct spi_driver adcxx8s_driver = {
-	.driver = {
-		.name	= "adcxx8s",
-		.owner	= THIS_MODULE,
-	},
-	.probe	= adcxx8s_probe,
+	.id_table = adcxx_ids,
+	.probe	= adcxx_probe,
 	.remove	= __devexit_p(adcxx_remove),
 };
 
 static int __init init_adcxx(void)
 {
-	int status;
-	status = spi_register_driver(&adcxx1s_driver);
-	if (status)
-		goto reg_1_failed;
-
-	status = spi_register_driver(&adcxx2s_driver);
-	if (status)
-		goto reg_2_failed;
-
-	status = spi_register_driver(&adcxx4s_driver);
-	if (status)
-		goto reg_4_failed;
-
-	status = spi_register_driver(&adcxx8s_driver);
-	if (status)
-		goto reg_8_failed;
-
-	return status;
-
-reg_8_failed:
-	spi_unregister_driver(&adcxx4s_driver);
-reg_4_failed:
-	spi_unregister_driver(&adcxx2s_driver);
-reg_2_failed:
-	spi_unregister_driver(&adcxx1s_driver);
-reg_1_failed:
-	return status;
+	return spi_register_driver(&adcxx_driver);
 }
 
 static void __exit exit_adcxx(void)
 {
-	spi_unregister_driver(&adcxx1s_driver);
-	spi_unregister_driver(&adcxx2s_driver);
-	spi_unregister_driver(&adcxx4s_driver);
-	spi_unregister_driver(&adcxx8s_driver);
+	spi_unregister_driver(&adcxx_driver);
 }
 
 module_init(init_adcxx);
@@ -326,8 +259,3 @@ module_exit(exit_adcxx);
 MODULE_AUTHOR("Marc Pignat");
 MODULE_DESCRIPTION("National Semiconductor adcxx8sxxx Linux driver");
 MODULE_LICENSE("GPL");
-
-MODULE_ALIAS("spi:adcxx1s");
-MODULE_ALIAS("spi:adcxx2s");
-MODULE_ALIAS("spi:adcxx4s");
-MODULE_ALIAS("spi:adcxx8s");
-- 
1.6.3.3

^ permalink raw reply related

* [PATCH] powerpc/44x: Update Canyonlands defconfig to support NOR, NAND and RTC
From: Stefan Roese @ 2009-07-29 17:05 UTC (permalink / raw)
  To: linuxppc-dev

This patch adds support for the following devices to the Canyonlands
defconfig file:
- NOR FLASH
- PPC4xx NAND controller (NDFC)
- I2C RTC (M41T80)

Signed-off-by: Stefan Roese <sr@denx.de>
---
 arch/powerpc/configs/44x/canyonlands_defconfig |  350 ++++++++++++++++++++----
 1 files changed, 297 insertions(+), 53 deletions(-)

diff --git a/arch/powerpc/configs/44x/canyonlands_defconfig b/arch/powerpc/configs/44x/canyonlands_defconfig
index 5e85412..b312b16 100644
--- a/arch/powerpc/configs/44x/canyonlands_defconfig
+++ b/arch/powerpc/configs/44x/canyonlands_defconfig
@@ -1,14 +1,14 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.29-rc3
-# Mon Feb  2 13:13:04 2009
+# Linux kernel version: 2.6.31-rc4
+# Wed Jul 29 17:27:20 2009
 #
 # CONFIG_PPC64 is not set
 
 #
 # Processor support
 #
-# CONFIG_6xx is not set
+# CONFIG_PPC_BOOK3S_32 is not set
 # CONFIG_PPC_85xx is not set
 # CONFIG_PPC_8xx is not set
 # CONFIG_40x is not set
@@ -31,15 +31,16 @@ CONFIG_GENERIC_TIME=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y
 # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
 CONFIG_IRQ_PER_CPU=y
 CONFIG_STACKTRACE_SUPPORT=y
 CONFIG_HAVE_LATENCYTOP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_ARCH_HAS_ILOG2_U32=y
 CONFIG_GENERIC_HWEIGHT=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 # CONFIG_ARCH_NO_VIRT_TO_BUS is not set
 CONFIG_PPC=y
@@ -53,11 +54,14 @@ CONFIG_PPC_UDBG_16550=y
 # CONFIG_GENERIC_TBSYNC is not set
 CONFIG_AUDIT_ARCH=y
 CONFIG_GENERIC_BUG=y
+CONFIG_DTC=y
 # CONFIG_DEFAULT_UIMAGE is not set
 CONFIG_PPC_DCR_NATIVE=y
 # CONFIG_PPC_DCR_MMIO is not set
 CONFIG_PPC_DCR=y
+CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
 CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+CONFIG_CONSTRUCTORS=y
 
 #
 # General setup
@@ -71,6 +75,7 @@ CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_SYSVIPC_SYSCTL=y
 CONFIG_POSIX_MQUEUE=y
+CONFIG_POSIX_MQUEUE_SYSCTL=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
 # CONFIG_AUDIT is not set
@@ -93,8 +98,12 @@ CONFIG_SYSFS_DEPRECATED_V2=y
 # CONFIG_NAMESPACES is not set
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_RD_GZIP=y
+# CONFIG_RD_BZIP2 is not set
+# CONFIG_RD_LZMA is not set
 # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
 CONFIG_EMBEDDED=y
 CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
@@ -104,23 +113,30 @@ CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
-CONFIG_COMPAT_BRK=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
-CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
 CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
 CONFIG_AIO=y
+CONFIG_HAVE_PERF_COUNTERS=y
+
+#
+# Performance Counters
+#
+# CONFIG_PERF_COUNTERS is not set
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_PCI_QUIRKS=y
 CONFIG_SLUB_DEBUG=y
+# CONFIG_STRIP_ASM_SYMS is not set
+CONFIG_COMPAT_BRK=y
 # CONFIG_SLAB is not set
 CONFIG_SLUB=y
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
 CONFIG_HAVE_OPROFILE=y
 # CONFIG_KPROBES is not set
 CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
@@ -128,6 +144,12 @@ CONFIG_HAVE_IOREMAP_PROT=y
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
 CONFIG_HAVE_ARCH_TRACEHOOK=y
+
+#
+# GCOV-based kernel profiling
+#
+# CONFIG_GCOV_KERNEL is not set
+# CONFIG_SLOW_WORK is not set
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -139,8 +161,7 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_BLOCK=y
-CONFIG_LBD=y
-# CONFIG_BLK_DEV_IO_TRACE is not set
+CONFIG_LBDAF=y
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_BLK_DEV_INTEGRITY is not set
 
@@ -176,6 +197,7 @@ CONFIG_PPC4xx_PCI_EXPRESS=y
 # CONFIG_ARCHES is not set
 CONFIG_CANYONLANDS=y
 # CONFIG_GLACIER is not set
+# CONFIG_REDWOOD is not set
 # CONFIG_YOSEMITE is not set
 # CONFIG_XILINX_VIRTEX440_GENERIC_BOARD is not set
 CONFIG_PPC44x_SIMPLE=y
@@ -218,6 +240,7 @@ CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 # CONFIG_MATH_EMULATION is not set
 # CONFIG_IOMMU_HELPER is not set
+# CONFIG_SWIOTLB is not set
 CONFIG_PPC_NEED_DMA_SYNC_OPS=y
 CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
 CONFIG_ARCH_HAS_WALK_MEMORY=y
@@ -237,10 +260,14 @@ CONFIG_PHYS_ADDR_T_64BIT=y
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
-CONFIG_UNEVICTABLE_LRU=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
+CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
+CONFIG_STDBINUTILS=y
 CONFIG_PPC_4K_PAGES=y
 # CONFIG_PPC_16K_PAGES is not set
 # CONFIG_PPC_64K_PAGES is not set
+# CONFIG_PPC_256K_PAGES is not set
 CONFIG_FORCE_MAX_ZONEORDER=11
 CONFIG_PROC_DEVICETREE=y
 CONFIG_CMDLINE_BOOL=y
@@ -265,6 +292,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
 # CONFIG_PCI_LEGACY is not set
 # CONFIG_PCI_DEBUG is not set
 # CONFIG_PCI_STUB is not set
+# CONFIG_PCI_IOV is not set
 # CONFIG_PCCARD is not set
 # CONFIG_HOTPLUG_PCI is not set
 # CONFIG_HAS_RAPIDIO is not set
@@ -282,14 +310,12 @@ CONFIG_PAGE_OFFSET=0xc0000000
 CONFIG_KERNEL_START=0xc0000000
 CONFIG_PHYSICAL_START=0x00000000
 CONFIG_TASK_SIZE=0xc0000000
-CONFIG_CONSISTENT_START=0xff100000
 CONFIG_CONSISTENT_SIZE=0x00200000
 CONFIG_NET=y
 
 #
 # Networking options
 #
-CONFIG_COMPAT_NET_DEV_OPS=y
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
 CONFIG_UNIX=y
@@ -339,6 +365,8 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_LAPB is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
+# CONFIG_PHONET is not set
+# CONFIG_IEEE802154 is not set
 # CONFIG_NET_SCHED is not set
 # CONFIG_DCB is not set
 
@@ -351,7 +379,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-# CONFIG_PHONET is not set
 # CONFIG_WIRELESS is not set
 # CONFIG_WIMAX is not set
 # CONFIG_RFKILL is not set
@@ -375,7 +402,101 @@ CONFIG_EXTRA_FIRMWARE=""
 # CONFIG_SYS_HYPERVISOR is not set
 CONFIG_CONNECTOR=y
 CONFIG_PROC_EVENTS=y
-# CONFIG_MTD is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_TESTS is not set
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_OF_PARTS=y
+# CONFIG_MTD_AR7_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+# CONFIG_MTD_OOPS is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+# CONFIG_MTD_PHYSMAP is not set
+CONFIG_MTD_PHYSMAP_OF=y
+# CONFIG_MTD_INTEL_VR_NOR is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+CONFIG_MTD_NAND_ECC_SMC=y
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+CONFIG_MTD_NAND_IDS=y
+CONFIG_MTD_NAND_NDFC=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_CAFE is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ALAUDA is not set
+# CONFIG_MTD_NAND_FSL_ELBC is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# LPDDR flash memory drivers
+#
+# CONFIG_MTD_LPDDR is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
 CONFIG_OF_DEVICE=y
 CONFIG_OF_I2C=y
 # CONFIG_PARPORT is not set
@@ -418,7 +539,11 @@ CONFIG_HAVE_IDE=y
 #
 
 #
-# Enable only one of the two stacks, unless you know what you are doing
+# You can enable one or both FireWire driver stacks.
+#
+
+#
+# See the help texts for more information.
 #
 # CONFIG_FIREWIRE is not set
 # CONFIG_IEEE1394 is not set
@@ -439,6 +564,8 @@ CONFIG_NET_ETHERNET=y
 # CONFIG_SUNGEM is not set
 # CONFIG_CASSINI is not set
 # CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_ETHOC is not set
+# CONFIG_DNET is not set
 # CONFIG_NET_TULIP is not set
 # CONFIG_HP100 is not set
 CONFIG_IBM_NEW_EMAC=y
@@ -457,6 +584,7 @@ CONFIG_IBM_NEW_EMAC_EMAC4=y
 # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
 # CONFIG_NET_PCI is not set
 # CONFIG_B44 is not set
+# CONFIG_KS8842 is not set
 # CONFIG_ATL2 is not set
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
@@ -467,7 +595,6 @@ CONFIG_IBM_NEW_EMAC_EMAC4=y
 #
 # CONFIG_WLAN_PRE80211 is not set
 # CONFIG_WLAN_80211 is not set
-# CONFIG_IWLWIFI_LEDS is not set
 
 #
 # Enable WiMAX (Networking options) to see the WiMAX drivers
@@ -542,7 +669,6 @@ CONFIG_LEGACY_PTY_COUNT=256
 # CONFIG_IPMI_HANDLER is not set
 # CONFIG_HW_RANDOM is not set
 # CONFIG_NVRAM is not set
-# CONFIG_GEN_RTC is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
 # CONFIG_RAW_DRIVER is not set
@@ -608,14 +734,17 @@ CONFIG_I2C_IBM_IIC=y
 # CONFIG_SENSORS_PCF8574 is not set
 # CONFIG_PCF8575 is not set
 # CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_MAX6875 is not set
 # CONFIG_SENSORS_TSL2550 is not set
 # CONFIG_I2C_DEBUG_CORE is not set
 # CONFIG_I2C_DEBUG_ALGO is not set
 # CONFIG_I2C_DEBUG_BUS is not set
 # CONFIG_I2C_DEBUG_CHIP is not set
 # CONFIG_SPI is not set
+
+#
+# PPS support
+#
+# CONFIG_PPS is not set
 CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
 # CONFIG_GPIOLIB is not set
 # CONFIG_W1 is not set
@@ -640,6 +769,7 @@ CONFIG_SENSORS_AD7414=y
 # CONFIG_SENSORS_F71805F is not set
 # CONFIG_SENSORS_F71882FG is not set
 # CONFIG_SENSORS_F75375S is not set
+# CONFIG_SENSORS_G760A is not set
 # CONFIG_SENSORS_GL518SM is not set
 # CONFIG_SENSORS_GL520SM is not set
 # CONFIG_SENSORS_IT87 is not set
@@ -654,11 +784,14 @@ CONFIG_SENSORS_AD7414=y
 # CONFIG_SENSORS_LM90 is not set
 # CONFIG_SENSORS_LM92 is not set
 # CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_LTC4215 is not set
 # CONFIG_SENSORS_LTC4245 is not set
+# CONFIG_SENSORS_LM95241 is not set
 # CONFIG_SENSORS_MAX1619 is not set
 # CONFIG_SENSORS_MAX6650 is not set
 # CONFIG_SENSORS_PC87360 is not set
 # CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_PCF8591 is not set
 # CONFIG_SENSORS_SIS5595 is not set
 # CONFIG_SENSORS_DME1737 is not set
 # CONFIG_SENSORS_SMSC47M1 is not set
@@ -666,6 +799,7 @@ CONFIG_SENSORS_AD7414=y
 # CONFIG_SENSORS_SMSC47B397 is not set
 # CONFIG_SENSORS_ADS7828 is not set
 # CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_TMP401 is not set
 # CONFIG_SENSORS_VIA686A is not set
 # CONFIG_SENSORS_VT1211 is not set
 # CONFIG_SENSORS_VT8231 is not set
@@ -700,24 +834,9 @@ CONFIG_SSB_POSSIBLE=y
 # CONFIG_MFD_WM8400 is not set
 # CONFIG_MFD_WM8350_I2C is not set
 # CONFIG_MFD_PCF50633 is not set
+# CONFIG_AB3100_CORE is not set
 # CONFIG_REGULATOR is not set
-
-#
-# Multimedia devices
-#
-
-#
-# Multimedia core support
-#
-# CONFIG_VIDEO_DEV is not set
-# CONFIG_DVB_CORE is not set
-# CONFIG_VIDEO_MEDIA is not set
-
-#
-# Multimedia drivers
-#
-# CONFIG_DAB is not set
-# CONFIG_USB_DABUSB is not set
+# CONFIG_MEDIA_SUPPORT is not set
 
 #
 # Graphics support
@@ -759,6 +878,7 @@ CONFIG_USB_MON=y
 # USB Host Controller Drivers
 #
 # CONFIG_USB_C67X00_HCD is not set
+# CONFIG_USB_XHCI_HCD is not set
 CONFIG_USB_EHCI_HCD=m
 # CONFIG_USB_EHCI_ROOT_HUB_TT is not set
 # CONFIG_USB_EHCI_TT_NEWSCHED is not set
@@ -767,9 +887,9 @@ CONFIG_USB_EHCI_HCD_PPC_OF=y
 # CONFIG_USB_ISP116X_HCD is not set
 # CONFIG_USB_ISP1760_HCD is not set
 CONFIG_USB_OHCI_HCD=y
-CONFIG_USB_OHCI_HCD_PPC_OF=y
 CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
 CONFIG_USB_OHCI_HCD_PPC_OF_LE=y
+CONFIG_USB_OHCI_HCD_PPC_OF=y
 CONFIG_USB_OHCI_HCD_PCI=y
 CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y
 CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y
@@ -789,11 +909,11 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
 # CONFIG_USB_TMC is not set
 
 #
-# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
 #
 
 #
-# see USB_STORAGE Help for more information
+# also be needed; see USB_STORAGE Help for more info
 #
 CONFIG_USB_LIBUSUAL=y
 
@@ -821,7 +941,6 @@ CONFIG_USB_LIBUSUAL=y
 # CONFIG_USB_LED is not set
 # CONFIG_USB_CYPRESS_CY7C63 is not set
 # CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGET is not set
 # CONFIG_USB_IDMOUSE is not set
 # CONFIG_USB_FTDI_ELAN is not set
 # CONFIG_USB_APPLEDISPLAY is not set
@@ -837,6 +956,7 @@ CONFIG_USB_LIBUSUAL=y
 #
 # OTG and related infrastructure
 #
+# CONFIG_NOP_USB_XCEIV is not set
 # CONFIG_UWB is not set
 # CONFIG_MMC is not set
 # CONFIG_MEMSTICK is not set
@@ -844,9 +964,70 @@ CONFIG_USB_LIBUSUAL=y
 # CONFIG_ACCESSIBILITY is not set
 # CONFIG_INFINIBAND is not set
 # CONFIG_EDAC is not set
-# CONFIG_RTC_CLASS is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1374 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+CONFIG_RTC_DRV_M41T80=y
+# CONFIG_RTC_DRV_M41T80_WDT is not set
+# CONFIG_RTC_DRV_S35390A is not set
+# CONFIG_RTC_DRV_FM3130 is not set
+# CONFIG_RTC_DRV_RX8581 is not set
+# CONFIG_RTC_DRV_RX8025 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1286 is not set
+# CONFIG_RTC_DRV_DS1511 is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T35 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_BQ4802 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+# CONFIG_RTC_DRV_GENERIC is not set
 # CONFIG_DMADEVICES is not set
+# CONFIG_AUXDISPLAY is not set
 # CONFIG_UIO is not set
+
+#
+# TI VLYNQ
+#
 # CONFIG_STAGING is not set
 
 #
@@ -860,11 +1041,12 @@ CONFIG_EXT2_FS=y
 # CONFIG_REISERFS_FS is not set
 # CONFIG_JFS_FS is not set
 # CONFIG_FS_POSIX_ACL is not set
-CONFIG_FILE_LOCKING=y
 # CONFIG_XFS_FS is not set
 # CONFIG_GFS2_FS is not set
 # CONFIG_OCFS2_FS is not set
 # CONFIG_BTRFS_FS is not set
+CONFIG_FILE_LOCKING=y
+CONFIG_FSNOTIFY=y
 CONFIG_DNOTIFY=y
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY_USER=y
@@ -874,6 +1056,11 @@ CONFIG_INOTIFY_USER=y
 # CONFIG_FUSE_FS is not set
 
 #
+# Caches
+#
+# CONFIG_FSCACHE is not set
+
+#
 # CD-ROM/DVD Filesystems
 #
 # CONFIG_ISO9660_FS is not set
@@ -906,6 +1093,7 @@ CONFIG_MISC_FILESYSTEMS=y
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
 # CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
 CONFIG_CRAMFS=y
 # CONFIG_SQUASHFS is not set
 # CONFIG_VXFS_FS is not set
@@ -916,6 +1104,7 @@ CONFIG_CRAMFS=y
 # CONFIG_ROMFS_FS is not set
 # CONFIG_SYSV_FS is not set
 # CONFIG_UFS_FS is not set
+# CONFIG_NILFS2_FS is not set
 CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
@@ -927,7 +1116,6 @@ CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
-# CONFIG_SUNRPC_REGISTER_V4 is not set
 # CONFIG_RPCSEC_GSS_KRB5 is not set
 # CONFIG_RPCSEC_GSS_SPKM3 is not set
 # CONFIG_SMB_FS is not set
@@ -941,8 +1129,48 @@ CONFIG_SUNRPC=y
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_NLS is not set
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
 # CONFIG_DLM is not set
+# CONFIG_BINARY_PRINTF is not set
 
 #
 # Library routines
@@ -957,11 +1185,13 @@ CONFIG_CRC32=y
 # CONFIG_CRC7 is not set
 # CONFIG_LIBCRC32C is not set
 CONFIG_ZLIB_INFLATE=y
-CONFIG_PLIST=y
+CONFIG_DECOMPRESS_GZIP=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
 CONFIG_HAS_DMA=y
 CONFIG_HAVE_LMB=y
+CONFIG_NLATTR=y
+CONFIG_GENERIC_ATOMIC64=y
 
 #
 # Kernel hacking
@@ -979,6 +1209,9 @@ CONFIG_DEBUG_KERNEL=y
 CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
 CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
+CONFIG_DETECT_HUNG_TASK=y
+# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
+CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
 CONFIG_SCHED_DEBUG=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_TIMER_STATS is not set
@@ -989,6 +1222,9 @@ CONFIG_SCHED_DEBUG=y
 # CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
 # CONFIG_DEBUG_KOBJECT is not set
@@ -1000,7 +1236,6 @@ CONFIG_SCHED_DEBUG=y
 # CONFIG_DEBUG_LIST is not set
 # CONFIG_DEBUG_SG is not set
 # CONFIG_DEBUG_NOTIFIERS is not set
-# CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
 # CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
@@ -1008,27 +1243,36 @@ CONFIG_SCHED_DEBUG=y
 # CONFIG_FAULT_INJECTION is not set
 # CONFIG_LATENCYTOP is not set
 CONFIG_SYSCTL_SYSCALL_CHECK=y
+# CONFIG_DEBUG_PAGEALLOC is not set
 CONFIG_HAVE_FUNCTION_TRACER=y
+CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
 CONFIG_HAVE_DYNAMIC_FTRACE=y
 CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
-
-#
-# Tracers
-#
+CONFIG_TRACING_SUPPORT=y
+CONFIG_FTRACE=y
 # CONFIG_FUNCTION_TRACER is not set
+# CONFIG_IRQSOFF_TRACER is not set
 # CONFIG_SCHED_TRACER is not set
-# CONFIG_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_ENABLE_DEFAULT_TRACERS is not set
 # CONFIG_BOOT_TRACER is not set
-# CONFIG_TRACE_BRANCH_PROFILING is not set
+CONFIG_BRANCH_PROFILE_NONE=y
+# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
+# CONFIG_PROFILE_ALL_BRANCHES is not set
 # CONFIG_STACK_TRACER is not set
-# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_KMEMTRACE is not set
+# CONFIG_WORKQUEUE_TRACER is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_DYNAMIC_DEBUG is not set
 # CONFIG_SAMPLES is not set
 CONFIG_HAVE_ARCH_KGDB=y
 # CONFIG_KGDB is not set
+# CONFIG_KMEMCHECK is not set
+# CONFIG_PPC_DISABLE_WERROR is not set
+CONFIG_PPC_WERROR=y
 CONFIG_PRINT_STACK_DEPTH=64
 # CONFIG_DEBUG_STACKOVERFLOW is not set
 # CONFIG_DEBUG_STACK_USAGE is not set
-# CONFIG_DEBUG_PAGEALLOC is not set
+# CONFIG_PPC_EMULATED_STATS is not set
 # CONFIG_CODE_PATCHING_SELFTEST is not set
 # CONFIG_FTR_FIXUP_SELFTEST is not set
 # CONFIG_MSI_BITMAP_SELFTEST is not set
-- 
1.6.3.4

^ permalink raw reply related

* [PATCH 7/7] hwmon: lm70: Convert to device table matching
From: Anton Vorontsov @ 2009-07-29 17:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: David Brownell, linux-kernel, lm-sensors, linuxppc-dev, linux-mtd,
	Jean Delvare, David Woodhouse
In-Reply-To: <20090729170345.GA26787@oksana.dev.rtsoft.ru>

This patch makes the code a little bit nicer, and shorter.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
 drivers/hwmon/lm70.c |   58 +++++++++++++++++--------------------------------
 1 files changed, 20 insertions(+), 38 deletions(-)

diff --git a/drivers/hwmon/lm70.c b/drivers/hwmon/lm70.c
index 3953c22..b4be110 100644
--- a/drivers/hwmon/lm70.c
+++ b/drivers/hwmon/lm70.c
@@ -32,6 +32,7 @@
 #include <linux/sysfs.h>
 #include <linux/hwmon.h>
 #include <linux/mutex.h>
+#include <linux/mod_devicetable.h>
 #include <linux/spi/spi.h>
 
 
@@ -130,11 +131,21 @@ static DEVICE_ATTR(name, S_IRUGO, lm70_show_name, NULL);
 
 /*----------------------------------------------------------------------*/
 
-static int __devinit common_probe(struct spi_device *spi, int chip)
+static int __devinit lm70_probe(struct spi_device *spi,
+				const struct spi_device_id *id)
 {
+	int chip = (int)id->data;
 	struct lm70 *p_lm70;
 	int status;
 
+	/* signaling is SPI_MODE_0 for both LM70 and TMP121 */
+	if (spi->mode & (SPI_CPOL | SPI_CPHA))
+		return -EINVAL;
+
+	/* 3-wire link (shared SI/SO) for LM70 */
+	if (chip == LM70_CHIP_LM70 && !(spi->mode & SPI_3WIRE))
+		return -EINVAL;
+
 	/* NOTE:  we assume 8-bit words, and convert to 16 bits manually */
 
 	p_lm70 = kzalloc(sizeof *p_lm70, GFP_KERNEL);
@@ -170,26 +181,6 @@ out_dev_reg_failed:
 	return status;
 }
 
-static int __devinit lm70_probe(struct spi_device *spi,
-				const struct spi_device_id *id)
-{
-	/* signaling is SPI_MODE_0 on a 3-wire link (shared SI/SO) */
-	if ((spi->mode & (SPI_CPOL | SPI_CPHA)) || !(spi->mode & SPI_3WIRE))
-		return -EINVAL;
-
-	return common_probe(spi, LM70_CHIP_LM70);
-}
-
-static int __devinit tmp121_probe(struct spi_device *spi,
-				  const struct spi_device_id *id)
-{
-	/* signaling is SPI_MODE_0 with only MISO connected */
-	if (spi->mode & (SPI_CPOL | SPI_CPHA))
-		return -EINVAL;
-
-	return common_probe(spi, LM70_CHIP_TMP121);
-}
-
 static int __devexit lm70_remove(struct spi_device *spi)
 {
 	struct lm70 *p_lm70 = dev_get_drvdata(&spi->dev);
@@ -203,41 +194,32 @@ static int __devexit lm70_remove(struct spi_device *spi)
 	return 0;
 }
 
-static struct spi_driver tmp121_driver = {
-	.driver = {
-		.name	= "tmp121",
-		.owner	= THIS_MODULE,
-	},
-	.probe	= tmp121_probe,
-	.remove	= __devexit_p(lm70_remove),
+
+static const struct spi_device_id lm70_ids[] = {
+	{ "lm70",   (void *)LM70_CHIP_LM70 },
+	{ "tmp121", (void *)LM70_CHIP_TMP121 },
+	{ },
 };
+MODULE_DEVICE_TABLE(spi, lm70_ids);
 
 static struct spi_driver lm70_driver = {
 	.driver = {
 		.name	= "lm70",
 		.owner	= THIS_MODULE,
 	},
+	.id_table = lm70_ids,
 	.probe	= lm70_probe,
 	.remove	= __devexit_p(lm70_remove),
 };
 
 static int __init init_lm70(void)
 {
-	int ret = spi_register_driver(&lm70_driver);
-	if (ret)
-		return ret;
-
-	ret = spi_register_driver(&tmp121_driver);
-	if (ret)
-		spi_unregister_driver(&lm70_driver);
-
-	return ret;
+	return spi_register_driver(&lm70_driver);
 }
 
 static void __exit cleanup_lm70(void)
 {
 	spi_unregister_driver(&lm70_driver);
-	spi_unregister_driver(&tmp121_driver);
 }
 
 module_init(init_lm70);
-- 
1.6.3.3

^ permalink raw reply related

* Re: BUG in dma-mapping.h:218 // MESH SCSI driver not working
From: Stef Simoens @ 2009-07-29 18:22 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1248425553.25467.20.camel@pasglop>

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

Hello,

Benjamin Herrenschmidt schreef:
> On Fri, 2009-07-24 at 00:18 +0200, Stef Simoens wrote:
>   
>> I tried the latest 2.6.31-rc3-git3 (without any other patch).
>> However, I have the same behaviour as the patched 2.6.30 (so: no BUG, 
>> but the mesh_abort messages).
>>     
> Would it be possible for you to roughly find out at what kernel version
> it stopped working ? (Some kernels may need my patch to avoid crashing)
>   
2.6.29 works OK
2.6.30-rc1 doesn't work (BUG...)
2.6.30-rc1 with your patch ... seems to hang when it should be mounting 
the root directory.

Is it worthwhile doing a git bisect?

-- 
Kind regards,

Stef Simoens



[-- Attachment #2: Type: text/html, Size: 1112 bytes --]

^ permalink raw reply

* Re: [PATCH][sata_fsl] Defer non-ncq commands when ncq commands active
From: Robert Hancock @ 2009-07-29 19:48 UTC (permalink / raw)
  To: ashish kalra; +Cc: linux-ide, linuxppc-dev
In-Reply-To: <Pine.WNT.4.64.0907292129310.4440@B00888-02.fsl.freescale.net>

On 07/29/2009 10:03 AM, ashish kalra wrote:
> From: Ashish Kalra <Ashish.Kalra@freescale.com>
> Date: Wed, 29 Jul 2009 21:15:49 +0530
>
> Fix for non-ncq & ncq commands causing timeouts when both are issued
> simultaneously to the same device.
>
> Signed-off-by: Ashish Kalra <Ashish.Kalra@freescale.com>
> ---
> drivers/ata/sata_fsl.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
> index 5a88b44..a33f130 100644
> --- a/drivers/ata/sata_fsl.c
> +++ b/drivers/ata/sata_fsl.c
> @@ -1262,6 +1262,7 @@ static struct scsi_host_template sata_fsl_sht = {
> static struct ata_port_operations sata_fsl_ops = {
> .inherits = &sata_pmp_port_ops,
>
> + .qc_defer = ata_std_qc_defer;
> .qc_prep = sata_fsl_qc_prep,
> .qc_issue = sata_fsl_qc_issue,
> .qc_fill_rtf = sata_fsl_qc_fill_rtf,

This doesn't look like it should change anything. sata_fsl_ops inherits 
from sata_pmp_port_ops, which inherits from sata_port_ops, which already 
sets qc_defer to ata_std_qc_defer.

^ permalink raw reply

* Re: [PATCH 1/7] spi: Add support for device table matching
From: Ben Dooks @ 2009-07-29 21:44 UTC (permalink / raw)
  To: Anton Vorontsov
  Cc: David Brownell, linux-kernel, lm-sensors, linuxppc-dev, linux-mtd,
	Jean Delvare, Andrew Morton, David Woodhouse
In-Reply-To: <20090729170457.GA4803@oksana.dev.rtsoft.ru>

On Wed, Jul 29, 2009 at 09:04:57PM +0400, Anton Vorontsov wrote:
> With this patch spi drivers can use standard spi_driver.id_table and
> MODULE_DEVICE_TABLE() mechanisms to bind against the devices. Just
> like we do with I2C drivers.
> 
> This is useful when a single driver supports several variants of
> devices but it is not possible to detect them in run-time (like
> non-JEDEC chips probing in drivers/mtd/devices/m25p80.c), and
> when platform_data usage is overkill.
> 
> This patch also makes life a lot easier on OpenFirmware platforms,
> since with OF we extensively use proper device IDs in modaliases.
> 
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
>  drivers/spi/spi.c               |   26 +++++++++++++++++++++++++-
>  include/linux/mod_devicetable.h |   13 +++++++++++++
>  include/linux/spi/spi.h         |   10 ++++++++--
>  scripts/mod/file2alias.c        |   13 +++++++++++++
>  4 files changed, 59 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
> index 70845cc..1431bf2 100644
> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -59,9 +59,24 @@ static struct device_attribute spi_dev_attrs[] = {
>   * and the sysfs version makes coldplug work too.
>   */
>  
> +static const struct spi_device_id *spi_match_id(const struct spi_device_id *id,
> +						const struct spi_device *sdev)
> +{
> +	while (id->name[0]) {
> +		if (!strcmp(sdev->modalias, id->name))
> +			return id;
> +		id++;
> +	}
> +	return NULL;
> +}
> +
>  static int spi_match_device(struct device *dev, struct device_driver *drv)
>  {
>  	const struct spi_device	*spi = to_spi_device(dev);
> +	const struct spi_driver	*sdrv = to_spi_driver(drv);
> +
> +	if (sdrv->id_table)
> +		return !!spi_match_id(sdrv->id_table, spi);
>  
>  	return strcmp(spi->modalias, drv->name) == 0;
>  }
> @@ -121,6 +136,13 @@ struct bus_type spi_bus_type = {
>  };
>  EXPORT_SYMBOL_GPL(spi_bus_type);
>  
> +static int spi_drv_probe_id(struct device *dev)
> +{
> +	const struct spi_driver		*sdrv = to_spi_driver(dev->driver);
> +	struct spi_device		*sdev = to_spi_device(dev);
> +
> +	return sdrv->probe_id(sdev, spi_match_id(sdrv->id_table, sdev));
> +}
>  
>  static int spi_drv_probe(struct device *dev)
>  {
> @@ -151,7 +173,9 @@ static void spi_drv_shutdown(struct device *dev)
>  int spi_register_driver(struct spi_driver *sdrv)
>  {
>  	sdrv->driver.bus = &spi_bus_type;
> -	if (sdrv->probe)
> +	if (sdrv->probe_id)
> +		sdrv->driver.probe = spi_drv_probe_id;
> +	else if (sdrv->probe)
>  		sdrv->driver.probe = spi_drv_probe;
>  	if (sdrv->remove)
>  		sdrv->driver.remove = spi_drv_remove;
> diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
> index 1bf5900..9660dca 100644
> --- a/include/linux/mod_devicetable.h
> +++ b/include/linux/mod_devicetable.h
> @@ -399,6 +399,19 @@ struct i2c_device_id {
>  			__attribute__((aligned(sizeof(kernel_ulong_t))));
>  };
>  
> +/* spi */
> +
> +#define SPI_NAME_SIZE	20
> +
> +struct spi_device_id {
> +	char name[SPI_NAME_SIZE];
> +#ifdef __KERNEL__
> +	void *data;
> +#else
> +	kernel_ulong_t data;
> +#endif
> +};
> +
>  /* dmi */
>  enum dmi_field {
>  	DMI_NONE,
> diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
> index c47c4b4..c8d92a1 100644
> --- a/include/linux/spi/spi.h
> +++ b/include/linux/spi/spi.h
> @@ -20,6 +20,7 @@
>  #define __LINUX_SPI_H
>  
>  #include <linux/device.h>
> +#include <linux/mod_devicetable.h>
>  
>  /*
>   * INTERFACES between SPI master-side drivers and SPI infrastructure.
> @@ -86,7 +87,7 @@ struct spi_device {
>  	int			irq;
>  	void			*controller_state;
>  	void			*controller_data;
> -	char			modalias[32];
> +	char			modalias[SPI_NAME_SIZE];
>  
>  	/*
>  	 * likely need more hooks for more protocol options affecting how
> @@ -145,6 +146,8 @@ struct spi_message;
>  
>  /**
>   * struct spi_driver - Host side "protocol" driver
> + * @id_table: List of SPI devices supported by this driver
> + * @probe_id: Binds this driver to the spi device via id_table matching.
>   * @probe: Binds this driver to the spi device.  Drivers can verify
>   *	that the device is actually present, and may need to configure
>   *	characteristics (such as bits_per_word) which weren't needed for
> @@ -170,6 +173,9 @@ struct spi_message;
>   * MMC, RTC, filesystem character device nodes, and hardware monitoring.
>   */
>  struct spi_driver {
> +	const struct spi_device_id *id_table;
> +	int			(*probe_id)(struct spi_device *spi,
> +					    const struct spi_device_id *id);

how about leaving it at just probe and have either a call or a field
in the device that you can look at to see if this was a new style of
call?

>  	int			(*probe)(struct spi_device *spi);
>  	int			(*remove)(struct spi_device *spi);
>  	void			(*shutdown)(struct spi_device *spi);
> @@ -732,7 +738,7 @@ struct spi_board_info {
>  	 * controller_data goes to spi_device.controller_data,
>  	 * irq is copied too
>  	 */
> -	char		modalias[32];
> +	char		modalias[SPI_NAME_SIZE];
>  	const void	*platform_data;
>  	void		*controller_data;
>  	int		irq;
> diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
> index 40e0045..9d446e3 100644
> --- a/scripts/mod/file2alias.c
> +++ b/scripts/mod/file2alias.c
> @@ -657,6 +657,15 @@ static int do_i2c_entry(const char *filename, struct i2c_device_id *id,
>  	return 1;
>  }
>  
> +/* Looks like: S */
> +static int do_spi_entry(const char *filename, struct spi_device_id *id,
> +			char *alias)
> +{
> +	sprintf(alias, "%s", id->name);
> +
> +	return 1;
> +}
> +
>  static const struct dmifield {
>  	const char *prefix;
>  	int field;
> @@ -853,6 +862,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info,
>  		do_table(symval, sym->st_size,
>  			 sizeof(struct i2c_device_id), "i2c",
>  			 do_i2c_entry, mod);
> +	else if (sym_is(symname, "__mod_spi_device_table"))
> +		do_table(symval, sym->st_size,
> +			 sizeof(struct spi_device_id), "spi",
> +			 do_spi_entry, mod);
>  	else if (sym_is(symname, "__mod_dmi_device_table"))
>  		do_table(symval, sym->st_size,
>  			 sizeof(struct dmi_system_id), "dmi",
> -- 
> 1.6.3.3
> 
> --
> 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/

-- 
Ben (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

^ permalink raw reply

* Re: [PATCH 1/7] spi: Add support for device table matching
From: Anton Vorontsov @ 2009-07-29 22:32 UTC (permalink / raw)
  To: Ben Dooks
  Cc: David Brownell, linux-kernel, lm-sensors, linuxppc-dev, linux-mtd,
	Jean Delvare, Andrew Morton, David Woodhouse
In-Reply-To: <20090729214446.GB1728@fluff.org.uk>

On Wed, Jul 29, 2009 at 10:44:46PM +0100, Ben Dooks wrote:
[...]
> > +	const struct spi_device_id *id_table;
> > +	int			(*probe_id)(struct spi_device *spi,
> > +					    const struct spi_device_id *id);
> 
> how about leaving it at just probe and have either a call or a field
> in the device that you can look at to see if this was a new style of
> call?

There are no technical difficulties with that, but it would be
inconsitent wrt other "device table"-aware buses (i2c, pci, of).

Note that I'm getting rid of probe_id function in patch 5/7, as a
cleanup step. I want to keep "new features" and "api cleanups"
separate. That way it's easier to review the changes.

Thanks!

-- 
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2

^ permalink raw reply

* Re: [PATCH 1/7] spi: Add support for device table matching
From: Anton Vorontsov @ 2009-07-29 22:40 UTC (permalink / raw)
  To: Ben Dooks
  Cc: David Brownell, linux-kernel, lm-sensors, linuxppc-dev, linux-mtd,
	Jean Delvare, Andrew Morton, David Woodhouse
In-Reply-To: <20090729223223.GA15280@oksana.dev.rtsoft.ru>

On Thu, Jul 30, 2009 at 02:32:23AM +0400, Anton Vorontsov wrote:
> On Wed, Jul 29, 2009 at 10:44:46PM +0100, Ben Dooks wrote:
> [...]
> > > +	const struct spi_device_id *id_table;
> > > +	int			(*probe_id)(struct spi_device *spi,
> > > +					    const struct spi_device_id *id);
> > 
> > how about leaving it at just probe and have either a call or a field
> > in the device that you can look at to see if this was a new style of
> > call?
> 
> There are no technical difficulties with that, but it would be
> inconsitent wrt other "device table"-aware buses (i2c, pci, of).

Btw, I guess there are few reasons why other buses pass id via
probe() call:

- You'll have to store the "id" in device struct forever, while
  in most cases you only need it during probe(), then you don't
  need it at all;

- If you don't store "id" in the device struct, you'll have
  to look up the device table twice (at first during bus->match(),
  and second time in drivers' probe() hook, i.e.
  probe(struct bus_dev *dev) {
  	id = bus_get_devid(dev); /* here */
  }

-- 
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2

^ permalink raw reply

* Re: BUG in dma-mapping.h:218 // MESH SCSI driver not working
From: Benjamin Herrenschmidt @ 2009-07-29 23:32 UTC (permalink / raw)
  To: Stef Simoens; +Cc: linuxppc-dev
In-Reply-To: <4A70937B.7040201@scarlet.be>

On Wed, 2009-07-29 at 20:22 +0200, Stef Simoens wrote:
> 2.6.29 works OK
> 2.6.30-rc1 doesn't work (BUG...)
> 2.6.30-rc1 with your patch ... seems to hang when it should be
> mounting the root directory.
> 
> Is it worthwhile doing a git bisect?

It probably is, since it should work with my patch, so something else
changed, maybe in the SCSI stack.

One thing I know is that the MESH HW has "issues" that make it very
sensitive to alignment DMA buffers, it's possible that the SCSI stack no
longer aligns some stuff ?

Cheers,
Ben.

^ permalink raw reply

* Re: BUG in dma-mapping.h:218 // MESH SCSI driver not working
From: Stef Simoens @ 2009-07-29 23:42 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
In-Reply-To: <1248910358.1509.27.camel@pasglop>

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

Benjamin Herrenschmidt schreef:
> On Wed, 2009-07-29 at 20:22 +0200, Stef Simoens wrote:
>   
>> 2.6.29 works OK
>> 2.6.30-rc1 doesn't work (BUG...)
>> 2.6.30-rc1 with your patch ... seems to hang when it should be
>> mounting the root directory.
>>
>> Is it worthwhile doing a git bisect?
>>     
>
> It probably is, since it should work with my patch, so something else
> changed, maybe in the SCSI stack.
>   
What would be the best approach?
- if the kernel boots, it's obviously 'good'
- but what if the kernel hits the 'BUG', should I apply your patch then? 
If it doesn't work with your patch, would it be 'bad' then?
> One thing I know is that the MESH HW has "issues" that make it very
> sensitive to alignment DMA buffers, it's possible that the SCSI stack no
> longer aligns some stuff ?
>   
Hmm, great... how can I verify this?

-- 
Regards,
Stef Simoens


[-- Attachment #2: Type: text/html, Size: 1422 bytes --]

^ permalink raw reply

* Re: BUG in dma-mapping.h:218 // MESH SCSI driver not working
From: Benjamin Herrenschmidt @ 2009-07-30  0:52 UTC (permalink / raw)
  To: Stef Simoens; +Cc: linuxppc-dev
In-Reply-To: <4A70DE54.5090406@scarlet.be>

On Thu, 2009-07-30 at 01:42 +0200, Stef Simoens wrote:
> What would be the best approach?
> - if the kernel boots, it's obviously 'good'
> - but what if the kernel hits the 'BUG', should I apply your patch
> then? If it doesn't work with your patch, would it be 'bad' then? 

Yes.

> > One thing I know is that the MESH HW has "issues" that make it very
> > sensitive to alignment DMA buffers, it's possible that the SCSI stack no
> > longer aligns some stuff ?
> >   
> Hmm, great... how can I verify this? 

I will once we get a closer idea of where the bug started to happen.

Thanks !

Cheers,
Ben.

^ permalink raw reply

* Re: [PATCH 1/7] spi: Add support for device table matching
From: Anton Vorontsov @ 2009-07-30  2:12 UTC (permalink / raw)
  To: Ben Dooks
  Cc: David Brownell, linux-kernel, lm-sensors, linuxppc-dev, linux-mtd,
	Jean Delvare, Andrew Morton, David Woodhouse
In-Reply-To: <20090729224050.GA17902@oksana.dev.rtsoft.ru>

On Thu, Jul 30, 2009 at 02:40:50AM +0400, Anton Vorontsov wrote:
[...]
> - If you don't store "id" in the device struct, you'll have
>   to look up the device table twice (at first during bus->match(),
>   and second time in drivers' probe() hook, i.e.
>   probe(struct bus_dev *dev) {
>   	id = bus_get_devid(dev); /* here */
>   }

Hm... actually, we're doing this anyway, but in spi core.

So, doing something like spi_get_device_id() might be a good
idea.

Thanks,

-- 
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2

^ permalink raw reply

* [PATCH] powerpc/mm: Fix SMP issue with MMU context handling code
From: Kumar Gala @ 2009-07-30  4:13 UTC (permalink / raw)
  To: linuxppc-dev

In switch_mmu_context() if we call steal_context_smp() to get a context
to use we shouldn't fall through and than call steal_context_up().  Doing
so can be problematic in that the 'mm' that steal_context_up() ends up
using will not get marked dirty in the stale_map[] for other CPUs that
might have used that mm.  Thus we could end up with stale TLB entries in
the other CPUs that can cause all kinda of havoc.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/mm/mmu_context_nohash.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c
index 92a1971..b1a727d 100644
--- a/arch/powerpc/mm/mmu_context_nohash.c
+++ b/arch/powerpc/mm/mmu_context_nohash.c
@@ -217,6 +217,7 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next)
 			id = steal_context_smp(id);
 			if (id == MMU_NO_CONTEXT)
 				goto again;
+			goto stolen;
 		}
 #endif /* CONFIG_SMP */
 		id = steal_context_up(id);
-- 
1.6.0.6

^ permalink raw reply related

* Re: [PATCH] powerpc/85xx: Fix ethernet link detection on MPC8569E-MDS boards
From: Kumar Gala @ 2009-07-30  4:14 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: linuxppc-dev
In-Reply-To: <20090624163028.GA18825@oksana.dev.rtsoft.ru>


On Jun 24, 2009, at 11:30 AM, Anton Vorontsov wrote:

> Linux isn't able to detect link changes on ethernet ports that were
> used by U-Boot. This is because U-Boot wrongly clears interrupt
> polarity bit (INTPOL, 0x400) in the extended status register (EXT_SR,
> 0x1b) of Marvell PHYs.
>
> There is no easy way for PHY drivers to know IRQ line polarity (we
> could extract it from the device tree and pass it to phydevs, but
> that'll be quite a lot of work), so for now just reset the PHYs to
> their default states.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/platforms/85xx/mpc85xx_mds.c |   13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)

applied to merge

- k

^ permalink raw reply

* Re: [PATCH] powerpc/85xx: Don't scan for TBI PHY addresses on MPC8569E-MDS boards
From: Kumar Gala @ 2009-07-30  4:16 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: linuxppc-dev
In-Reply-To: <20090701173925.GA22134@oksana.dev.rtsoft.ru>


On Jul 1, 2009, at 12:39 PM, Anton Vorontsov wrote:

> Sometimes (e.g. when there are no UEMs attached to a board)
> fsl_pq_mdio_find_free() fails to find a spare address for a TBI PHY,
> this is because get_phy_id() returns bogus 0x0000ffff values
> (0xffffffff is expected), and therefore mdio bus probing fails with
> the following message:
>
>  fsl-pq_mdio: probe of e0082120.mdio failed with error -16
>
> And obviously ethernet doesn't work after this.
>
> This patch solves the problem by adding tbi-phy node into mdio node,
> so that we won't scan for spare addresses, we'll just use a fixed one.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/boot/dts/mpc8569mds.dts |    4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)

applied to merge

- k

^ permalink raw reply

* Re: [PATCH] powerpc/83xx: Fix PCI IO base address on MPC837xE-RDB boards
From: Kumar Gala @ 2009-07-30  4:18 UTC (permalink / raw)
  To: Anton Vorontsov; +Cc: linuxppc-dev
In-Reply-To: <20090720213643.GA4209@oksana.dev.rtsoft.ru>


On Jul 20, 2009, at 4:36 PM, Anton Vorontsov wrote:

> U-Boot maps PCI IO at 0xe0300000, while current dts files specify
> 0xe2000000. This leads to the following oops with  
> CONFIG_8139TOO_PIO=y.
>
> 8139too Fast Ethernet driver 0.9.28
> Machine check in kernel mode.
> Caused by (from SRR1=41000): Transfer error ack signal
> Oops: Machine check, sig: 7 [#1]
> MPC837x RDB
> [...]
> NIP [00000900] 0x900
> LR [c0439df8] rtl8139_init_board+0x238/0x524
> Call Trace:
> [cf831d90] [c0439dcc] rtl8139_init_board+0x20c/0x524 (unreliable)
> [cf831de0] [c043a15c] rtl8139_init_one+0x78/0x65c
> [cf831e40] [c0235250] pci_call_probe+0x20/0x30
> [...]
>
> This patch fixes the issue by specifying the correct PCI IO base
> address.
>
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/boot/dts/mpc8377_rdb.dts |    2 +-
> arch/powerpc/boot/dts/mpc8378_rdb.dts |    2 +-
> arch/powerpc/boot/dts/mpc8379_rdb.dts |    2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)

applied to merge

- k

^ permalink raw reply

* Re: [RFC/PATCH] powerpc: Don't use alloc_bootmem in cpm_uart_cpm2.c
From: Kumar Gala @ 2009-07-30  4:22 UTC (permalink / raw)
  To: Mark Ware; +Cc: Linuxppc-dev Development
In-Reply-To: <4A645A27.7040002@elphinstone.net>


On Jul 20, 2009, at 6:51 AM, Mark Ware wrote:

> This is another alloc_bootmem() -> kzalloc() change, this time to
> fix the non-fatal badness caused when booting with a cpm2_uart  
> console.
>
> Signed-Off-By: Mark Ware <mware@elphinstone.net>
>
> ---
> drivers/serial/cpm_uart/cpm_uart_cpm2.c |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)

applied to merge (had to fix up patch by hand).

- k

^ permalink raw reply

* Re: [PATCH] powerpc/86xx: Update defconfig for GE Fanuc's PPC9A
From: Kumar Gala @ 2009-07-30  4:32 UTC (permalink / raw)
  To: Martyn Welch; +Cc: linuxppc-dev
In-Reply-To: <20090702141835.22350.25503.stgit@ES-J7S4D2J.amer.consind.ge.com>


On Jul 2, 2009, at 9:18 AM, Martyn Welch wrote:

> General update of defconfig including the following notable changes:
> - Enable GPIO access via sysfs on GE Fanuc's PPC9A.
> - Enable Highmem support.
> - Support for PCMCIA based daughter card.
>
> Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
> ---
>
> arch/powerpc/configs/86xx/gef_ppc9a_defconfig |  518 ++++++++ 
> +----------------
> 1 files changed, 196 insertions(+), 322 deletions(-)

applied to merge

- k

^ permalink raw reply

* Re: [PATCH] powerpc/86xx: Update GE Fanuc sbc310 default configuration
From: Kumar Gala @ 2009-07-30  4:32 UTC (permalink / raw)
  To: Martyn Welch; +Cc: linuxppc-dev
In-Reply-To: <20090702141844.22370.87052.stgit@ES-J7S4D2J.amer.consind.ge.com>


On Jul 2, 2009, at 9:18 AM, Martyn Welch wrote:

> General update of defconfig including the following notable changes:
> - Enable Highmem support.
> - Support for PCMCIA based daughter card.
>
> Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
> ---
>
> arch/powerpc/configs/86xx/gef_sbc310_defconfig |  213 +++++++++++++++ 
> ++-------
> 1 files changed, 154 insertions(+), 59 deletions(-)


applied to merge

- k

^ permalink raw reply

* Re: [PATCH] powerpc/86xx: Update GE Fanuc sbc310 DTS
From: Kumar Gala @ 2009-07-30  4:33 UTC (permalink / raw)
  To: Martyn Welch; +Cc: linuxppc-dev
In-Reply-To: <20090702141825.22330.83064.stgit@ES-J7S4D2J.amer.consind.ge.com>


On Jul 2, 2009, at 9:18 AM, Martyn Welch wrote:

> Update GE Fanuc DTS to match the alterations suggested during the  
> merge of the ppc9a DTS in commit  
> 740d36ae6344f38c4da64c2ede765d7d2dd1f132
>
> Signed-off-by: Martyn Welch <martyn.welch@gefanuc.com>
> ---
>
> arch/powerpc/boot/dts/gef_sbc310.dts |   29 ++++++++++++ 
> +----------------
> 1 files changed, 13 insertions(+), 16 deletions(-)

tried to apply this but wasn't able to.. please repost and will defer  
for .32 at this point (and fix the commit message since its a run on,  
guessing that might be related to why I couldn't apply it).

- k

^ permalink raw reply

* Please pull from 'merge' branch for 2.6.31
From: Kumar Gala @ 2009-07-30  4:38 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

Please pull from 'merge' branch of

	master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc.git merge

This is pretty much some bug fixes and defconfig updates.

- k

to receive the following updates:

 arch/powerpc/boot/dts/mpc8377_rdb.dts             |    2
 arch/powerpc/boot/dts/mpc8378_rdb.dts             |    2
 arch/powerpc/boot/dts/mpc8379_rdb.dts             |    2
 arch/powerpc/boot/dts/mpc8569mds.dts              |    4
 arch/powerpc/configs/83xx/asp8347_defconfig       |  106 ++--
 arch/powerpc/configs/83xx/kmeter1_defconfig       |  176 ++++---
 arch/powerpc/configs/83xx/mpc8313_rdb_defconfig   |  168 +++++--
 arch/powerpc/configs/83xx/mpc8315_rdb_defconfig   |  168 +++++--
 arch/powerpc/configs/83xx/mpc832x_mds_defconfig   |  111 ++--
 arch/powerpc/configs/83xx/mpc832x_rdb_defconfig   |  120 ++---
 arch/powerpc/configs/83xx/mpc834x_itx_defconfig   |  114 ++--
 arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig |  114 ++--
 arch/powerpc/configs/83xx/mpc834x_mds_defconfig   |  104 ++--
 arch/powerpc/configs/83xx/mpc836x_mds_defconfig   |  111 ++--
 arch/powerpc/configs/83xx/mpc836x_rdk_defconfig   |  104 ++--
 arch/powerpc/configs/83xx/mpc837x_mds_defconfig   |  110 ++--
 arch/powerpc/configs/83xx/mpc837x_rdb_defconfig   |  162 ++++--
 arch/powerpc/configs/83xx/sbc834x_defconfig       |  103 ++--
 arch/powerpc/configs/85xx/ksi8560_defconfig       |   93 ++-
 arch/powerpc/configs/85xx/mpc8540_ads_defconfig   |   91 ++-
 arch/powerpc/configs/85xx/mpc8560_ads_defconfig   |   99 ++--
 arch/powerpc/configs/85xx/mpc85xx_cds_defconfig   |   99 ++--
 arch/powerpc/configs/85xx/sbc8548_defconfig       |   96 ++--
 arch/powerpc/configs/85xx/sbc8560_defconfig       |   91 ++-
 arch/powerpc/configs/85xx/socrates_defconfig      |  165 ++++--
 arch/powerpc/configs/85xx/stx_gp3_defconfig       |  119 +++--
 arch/powerpc/configs/85xx/tqm8540_defconfig       |  100 ++--
 arch/powerpc/configs/85xx/tqm8541_defconfig       |  101 ++--
 arch/powerpc/configs/85xx/tqm8548_defconfig       |  100 ++--
 arch/powerpc/configs/85xx/tqm8555_defconfig       |  101 ++--
 arch/powerpc/configs/85xx/tqm8560_defconfig       |  101 ++--
 arch/powerpc/configs/85xx/xes_mpc85xx_defconfig   |  118 ++--
 arch/powerpc/configs/86xx/gef_ppc9a_defconfig     |  521 ++++++++--------------
 arch/powerpc/configs/86xx/gef_sbc310_defconfig    |  216 ++++++---
 arch/powerpc/configs/86xx/gef_sbc610_defconfig    |  130 +++--
 arch/powerpc/configs/86xx/mpc8610_hpcd_defconfig  |  118 +++-
 arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig  |  186 +++----
 arch/powerpc/configs/86xx/sbc8641d_defconfig      |  112 +++-
 arch/powerpc/configs/adder875_defconfig           |   97 ++--
 arch/powerpc/configs/c2k_defconfig                |  121 +++--
 arch/powerpc/configs/ep8248e_defconfig            |   97 ++--
 arch/powerpc/configs/ep88xc_defconfig             |   91 ++-
 arch/powerpc/configs/linkstation_defconfig        |  116 +++-
 arch/powerpc/configs/mgcoge_defconfig             |   97 ++--
 arch/powerpc/configs/mgsuvd_defconfig             |   89 ++-
 arch/powerpc/configs/mpc7448_hpc2_defconfig       |  103 ++--
 arch/powerpc/configs/mpc8272_ads_defconfig        |  104 ++--
 arch/powerpc/configs/mpc83xx_defconfig            |  162 ++++--
 arch/powerpc/configs/mpc85xx_defconfig            |  193 +++-----
 arch/powerpc/configs/mpc85xx_smp_defconfig        |  193 +++-----
 arch/powerpc/configs/mpc866_ads_defconfig         |   92 ++-
 arch/powerpc/configs/mpc86xx_defconfig            |  186 +++----
 arch/powerpc/configs/mpc885_ads_defconfig         |   91 ++-
 arch/powerpc/configs/pq2fads_defconfig            |  110 ++--
 arch/powerpc/configs/prpmc2800_defconfig          |  158 ++++--
 arch/powerpc/configs/storcenter_defconfig         |  108 ++--
 arch/powerpc/mm/mmu_context_nohash.c              |    1
 arch/powerpc/platforms/85xx/mpc85xx_mds.c         |   13
 drivers/serial/cpm_uart/cpm_uart_cpm2.c           |    2
 59 files changed, 4007 insertions(+), 2755 deletions(-)

Anton Vorontsov (3):
      powerpc/85xx: Fix ethernet link detection on MPC8569E-MDS boards
      powerpc/85xx: Don't scan for TBI PHY addresses on MPC8569E-MDS boards
      powerpc/83xx: Fix PCI IO base address on MPC837xE-RDB boards

Kumar Gala (2):
      powerpc/mm: Fix SMP issue with MMU context handling code
      powerpc: Update defconfigs for embedded 6xx/7xxx, 8xx, 8{3,5,6}xxx

Mark Ware (1):
      cpm_uart: Don't use alloc_bootmem in cpm_uart_cpm2.c

Martyn Welch (2):
      powerpc/86xx: Update defconfig for GE Fanuc's PPC9A
      powerpc/86xx: Update GE Fanuc sbc310 default configuration

^ permalink raw reply

* fsldma patches?
From: Kumar Gala @ 2009-07-30  4:40 UTC (permalink / raw)
  To: Dan Williams; +Cc: Linuxppc-dev Development, Ira W. Snyder

Dan,

What happened with the set of patches that Ira posted for fsldma?

- k

^ permalink raw reply

* Re: 82xx, mgcoge: updates for 2.6.32
From: Heiko Schocher @ 2009-07-30  5:29 UTC (permalink / raw)
  To: david; +Cc: linuxppc-dev
In-Reply-To: <20090729103203.GA6369@yookeroo.seuss>

Hello David,

David Gibson wrote:
> On Wed, Jul 29, 2009 at 10:32:30AM +0200, Heiko Schocher wrote:
> 
> [snip]
>> +			mdio@10d40 {
>> +				device_type = "mdio";
> 
> Drop this device_type.

Done.

>> +				compatible = "fsl,cpm2-mdio-bitbang";
>> +				reg = <0x10d00 0x14>;
>> +				#address-cells = <1>;
>> +				#size-cells = <0>;
>> +				fsl,mdio-pin = <12>;
>> +				fsl,mdc-pin = <13>;
>> +
>> +				phy0: ethernet-phy@0 {
>> +					reg = <0x0>;
>> +					device_type = "ethernet-phy";
> 
> And this one, too.

Done.

>> +				};
>> +
>> +				phy1: ethernet-phy@1 {
>> +					reg = <0x1>;
>> +					device_type = "ethernet-phy";
>> +				};
>> +			};
> 

I collect more comments, then the patch follows.
Thanks
bye
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply

* Re: 82xx, mgcoge: updates for 2.6.32
From: Heiko Schocher @ 2009-07-30  5:31 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev
In-Reply-To: <820BFB98-F940-4B5C-8D4A-9C069B3DC199@kernel.crashing.org>

Hello Kumar,

Kumar Gala wrote:
> 
> On Jul 29, 2009, at 3:32 AM, Heiko Schocher wrote:
> 
>> - add I2C support
>> - add FCC1 and FCC2 support
>> - fix bogus gpio numbering in plattformcode
>>
>> Signed-off-by: Heiko Schocher <hs@denx.de>
>> ---
>> - based on git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git
>>  next branch
>> - checked with checkpatch.pl:
>> $ ./scripts/checkpatch.pl 0001-82xx-mgcoge-updates-for-2.6.32.patch
>> total: 0 errors, 0 warnings, 531 lines checked
>>
>> 0001-82xx-mgcoge-updates-for-2.6.32.patch has no obvious style
>> problems and is ready for submission.
>> $
>>
>> BTW: Who is PPC82XX Maintainer? I couldn;t find such an entry
>>     in the MAINTAINERS file ...
> 
> its me.

Ah, thought it, but I wasn;t sure ... Hmm, maybe you can update
the MAINTAINERS entry?

>> arch/powerpc/boot/dts/mgcoge.dts      |   56 ++++++++++
>> arch/powerpc/configs/mgcoge_defconfig |  178
>> +++++++++++++++++++++++++-------
> 
> Can we hold off or pull the defconfig update into a separate patch.  I
> normally update defconfigs in a late -rc series and that will probably
> generate merge conflicts.

I make a seperate patch for the defconfig.

Thanks. I wait for more comments, before I post the next version
of this patch.
bye
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox