aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorLars Poeschel <poeschel@lemonage.de>2013-08-28 04:38:50 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-08-30 03:25:52 -0400
commit45971686967e252e800992bb23f3f9809ceece38 (patch)
treed213673d62a4e9ba4011bdf06c59dbf53758a04d /drivers/gpio
parent6c56c6cd8031e01719e5a5392571c3be08737434 (diff)
gpio: mcp23s08: rename the device tree property
The device tree property should be more descriptive. microchip seems more reasonable than mcp. The old mcp prefix is still supported but marked as deprecated. Users of mcp have to switch to the microchip prefix. Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-mcp23s08.c41
1 files changed, 34 insertions, 7 deletions
diff --git a/drivers/gpio/gpio-mcp23s08.c b/drivers/gpio/gpio-mcp23s08.c
index d96bf8a76f5c..2deb0c5e54a4 100644
--- a/drivers/gpio/gpio-mcp23s08.c
+++ b/drivers/gpio/gpio-mcp23s08.c
@@ -483,10 +483,21 @@ fail:
483#ifdef CONFIG_SPI_MASTER 483#ifdef CONFIG_SPI_MASTER
484static struct of_device_id mcp23s08_spi_of_match[] = { 484static struct of_device_id mcp23s08_spi_of_match[] = {
485 { 485 {
486 .compatible = "mcp,mcp23s08", .data = (void *) MCP_TYPE_S08, 486 .compatible = "microchip,mcp23s08",
487 .data = (void *) MCP_TYPE_S08,
487 }, 488 },
488 { 489 {
489 .compatible = "mcp,mcp23s17", .data = (void *) MCP_TYPE_S17, 490 .compatible = "microchip,mcp23s17",
491 .data = (void *) MCP_TYPE_S17,
492 },
493/* NOTE: The use of the mcp prefix is deprecated and will be removed. */
494 {
495 .compatible = "mcp,mcp23s08",
496 .data = (void *) MCP_TYPE_S08,
497 },
498 {
499 .compatible = "mcp,mcp23s17",
500 .data = (void *) MCP_TYPE_S17,
490 }, 501 },
491 { }, 502 { },
492}; 503};
@@ -496,10 +507,21 @@ MODULE_DEVICE_TABLE(of, mcp23s08_spi_of_match);
496#if IS_ENABLED(CONFIG_I2C) 507#if IS_ENABLED(CONFIG_I2C)
497static struct of_device_id mcp23s08_i2c_of_match[] = { 508static struct of_device_id mcp23s08_i2c_of_match[] = {
498 { 509 {
499 .compatible = "mcp,mcp23008", .data = (void *) MCP_TYPE_008, 510 .compatible = "microchip,mcp23008",
511 .data = (void *) MCP_TYPE_008,
512 },
513 {
514 .compatible = "microchip,mcp23017",
515 .data = (void *) MCP_TYPE_017,
500 }, 516 },
517/* NOTE: The use of the mcp prefix is deprecated and will be removed. */
501 { 518 {
502 .compatible = "mcp,mcp23017", .data = (void *) MCP_TYPE_017, 519 .compatible = "mcp,mcp23008",
520 .data = (void *) MCP_TYPE_008,
521 },
522 {
523 .compatible = "mcp,mcp23017",
524 .data = (void *) MCP_TYPE_017,
503 }, 525 },
504 { }, 526 { },
505}; 527};
@@ -620,10 +642,15 @@ static int mcp23s08_probe(struct spi_device *spi)
620 if (match) { 642 if (match) {
621 type = (int)match->data; 643 type = (int)match->data;
622 status = of_property_read_u32(spi->dev.of_node, 644 status = of_property_read_u32(spi->dev.of_node,
623 "mcp,spi-present-mask", &spi_present_mask); 645 "microchip,spi-present-mask", &spi_present_mask);
624 if (status) { 646 if (status) {
625 dev_err(&spi->dev, "DT has no spi-present-mask\n"); 647 status = of_property_read_u32(spi->dev.of_node,
626 return -ENODEV; 648 "mcp,spi-present-mask", &spi_present_mask);
649 if (status) {
650 dev_err(&spi->dev,
651 "DT has no spi-present-mask\n");
652 return -ENODEV;
653 }
627 } 654 }
628 if ((spi_present_mask <= 0) || (spi_present_mask >= 256)) { 655 if ((spi_present_mask <= 0) || (spi_present_mask >= 256)) {
629 dev_err(&spi->dev, "invalid spi-present-mask\n"); 656 dev_err(&spi->dev, "invalid spi-present-mask\n");