Lines Matching +full:i2c +full:- +full:compatible

1 // SPDX-License-Identifier: GPL-2.0
3 * Microchip KSZ9477 series register access through I2C
5 * Copyright (C) 2018-2019 Microchip Technology Inc.
8 #include <linux/i2c.h>
17 static int ksz9477_i2c_probe(struct i2c_client *i2c) in ksz9477_i2c_probe() argument
23 dev = ksz_switch_alloc(&i2c->dev, i2c); in ksz9477_i2c_probe()
25 return -ENOMEM; in ksz9477_i2c_probe()
29 rc.lock_arg = &dev->regmap_mutex; in ksz9477_i2c_probe()
30 dev->regmap[i] = devm_regmap_init_i2c(i2c, &rc); in ksz9477_i2c_probe()
31 if (IS_ERR(dev->regmap[i])) { in ksz9477_i2c_probe()
32 return dev_err_probe(&i2c->dev, PTR_ERR(dev->regmap[i]), in ksz9477_i2c_probe()
38 if (i2c->dev.platform_data) in ksz9477_i2c_probe()
39 dev->pdata = i2c->dev.platform_data; in ksz9477_i2c_probe()
41 dev->irq = i2c->irq; in ksz9477_i2c_probe()
49 i2c_set_clientdata(i2c, dev); in ksz9477_i2c_probe()
54 static void ksz9477_i2c_remove(struct i2c_client *i2c) in ksz9477_i2c_remove() argument
56 struct ksz_device *dev = i2c_get_clientdata(i2c); in ksz9477_i2c_remove()
62 static void ksz9477_i2c_shutdown(struct i2c_client *i2c) in ksz9477_i2c_shutdown() argument
64 struct ksz_device *dev = i2c_get_clientdata(i2c); in ksz9477_i2c_shutdown()
71 i2c_set_clientdata(i2c, NULL); in ksz9477_i2c_shutdown()
75 { "ksz9477-switch" },
79 MODULE_DEVICE_TABLE(i2c, ksz9477_i2c_id);
83 .compatible = "microchip,ksz9477",
87 .compatible = "microchip,ksz9896",
91 .compatible = "microchip,ksz9897",
95 .compatible = "microchip,ksz9893",
99 .compatible = "microchip,ksz9563",
103 .compatible = "microchip,ksz8563",
107 .compatible = "microchip,ksz8567",
111 .compatible = "microchip,ksz9567",
120 .name = "ksz9477-switch",
132 MODULE_DESCRIPTION("Microchip KSZ9477 Series Switch I2C access Driver");