Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3)  * I2C driver for stand-alone PCF8584 style adapters on Zorro cards
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5)  * Original ICY documentation can be found on Aminet:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6)  * https://aminet.net/package/docs/hard/icy
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8)  * There has been a modern community re-print of this design in 2019:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9)  * https://www.a1k.org/forum/index.php?threads/70106/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11)  * The card is basically a Philips PCF8584 connected straight to the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12)  * beginning of the AutoConfig'd address space (register S1 on base+2),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13)  * with /INT on /INT2 on the Zorro bus.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15)  * Copyright (c) 2019 Max Staudt <max@enpas.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17)  * This started as a fork of i2c-elektor.c and has evolved since.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18)  * Thanks go to its authors for providing a base to grow on.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21)  * IRQ support is currently not implemented.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23)  * As it turns out, i2c-algo-pcf is really written with i2c-elektor's
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24)  * edge-triggered ISA interrupts in mind, while the Amiga's Zorro bus has
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25)  * level-triggered interrupts. This means that once an interrupt occurs, we
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26)  * have to tell the PCF8584 to shut up immediately, or it will keep the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27)  * interrupt line busy and cause an IRQ storm.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29)  * However, because of the PCF8584's host-side protocol, there is no good
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30)  * way to just quieten it without side effects. Rather, we have to perform
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31)  * the next read/write operation straight away, which will reset the /INT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32)  * pin. This entails re-designing the core of i2c-algo-pcf in the future.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33)  * For now, we never request an IRQ from the PCF8584, and poll it instead.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) #include <linux/delay.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) #include <linux/io.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) #include <linux/ioport.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) #include <linux/kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) #include <linux/i2c.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) #include <linux/i2c-algo-pcf.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) #include <asm/amigahw.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) #include <asm/amigaints.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) #include <linux/zorro.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) #include "../algos/i2c-algo-pcf.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) struct icy_i2c {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) 	struct i2c_adapter adapter;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) 	void __iomem *reg_s0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 	void __iomem *reg_s1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 	struct fwnode_handle *ltc2990_fwnode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 	struct i2c_client *ltc2990_client;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62)  * Functions called by i2c-algo-pcf
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) static void icy_pcf_setpcf(void *data, int ctl, int val)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 	struct icy_i2c *i2c = (struct icy_i2c *)data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 	u8 __iomem *address = ctl ? i2c->reg_s1 : i2c->reg_s0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) 	z_writeb(val, address);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) static int icy_pcf_getpcf(void *data, int ctl)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 	struct icy_i2c *i2c = (struct icy_i2c *)data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 	u8 __iomem *address = ctl ? i2c->reg_s1 : i2c->reg_s0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	return z_readb(address);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) static int icy_pcf_getown(void *data)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 	return 0x55;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) static int icy_pcf_getclock(void *data)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	return 0x1c;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) static void icy_pcf_waitforpin(void *data)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 	usleep_range(50, 150);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98)  * Main i2c-icy part
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) static unsigned short const icy_ltc2990_addresses[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	0x4c, 0x4d, 0x4e, 0x4f, I2C_CLIENT_END
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)  * Additional sensors exposed once this property is applied:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)  *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)  * in1 will be the voltage of the 5V rail, divided by 2.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)  * in2 will be the voltage of the 12V rail, divided by 4.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)  * temp3 will be measured using a PCB loop next the chip.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) static const u32 icy_ltc2990_meas_mode[] = {0, 3};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) static const struct property_entry icy_ltc2990_props[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) 	PROPERTY_ENTRY_U32_ARRAY("lltc,meas-mode", icy_ltc2990_meas_mode),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 	{ }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) static int icy_probe(struct zorro_dev *z,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) 		     const struct zorro_device_id *ent)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 	struct icy_i2c *i2c;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	struct i2c_algo_pcf_data *algo_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 	struct fwnode_handle *new_fwnode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) 	struct i2c_board_info ltc2990_info = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 		.type		= "ltc2990",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) 	};
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	i2c = devm_kzalloc(&z->dev, sizeof(*i2c), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 	if (!i2c)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 		return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) 	algo_data = devm_kzalloc(&z->dev, sizeof(*algo_data), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) 	if (!algo_data)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) 		return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 	dev_set_drvdata(&z->dev, i2c);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) 	i2c->adapter.dev.parent = &z->dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) 	i2c->adapter.owner = THIS_MODULE;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) 	/* i2c->adapter.algo assigned by i2c_pcf_add_bus() */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) 	i2c->adapter.algo_data = algo_data;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) 	strlcpy(i2c->adapter.name, "ICY I2C Zorro adapter",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) 		sizeof(i2c->adapter.name));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) 	if (!devm_request_mem_region(&z->dev,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) 				     z->resource.start,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) 				     4, i2c->adapter.name))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 		return -ENXIO;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 	/* Driver private data */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) 	i2c->reg_s0 = ZTWO_VADDR(z->resource.start);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 	i2c->reg_s1 = ZTWO_VADDR(z->resource.start + 2);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	algo_data->data = i2c;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	algo_data->setpcf     = icy_pcf_setpcf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	algo_data->getpcf     = icy_pcf_getpcf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 	algo_data->getown     = icy_pcf_getown;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	algo_data->getclock   = icy_pcf_getclock;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	algo_data->waitforpin = icy_pcf_waitforpin;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 	if (i2c_pcf_add_bus(&i2c->adapter)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 		dev_err(&z->dev, "i2c_pcf_add_bus() failed\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 		return -ENXIO;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) 	dev_info(&z->dev, "ICY I2C controller at %pa, IRQ not implemented\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 		 &z->resource.start);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 	/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 	 * The 2019 a1k.org PCBs have an LTC2990 at 0x4c, so start
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	 * it automatically once ltc2990 is modprobed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 	 *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) 	 * in0 is the voltage of the internal 5V power supply.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	 * temp1 is the temperature inside the chip.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 	 *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 	 * See property_entry above for in1, in2, temp3.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 	 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) 	new_fwnode = fwnode_create_software_node(icy_ltc2990_props, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	if (IS_ERR(new_fwnode)) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 		dev_info(&z->dev, "Failed to create fwnode for LTC2990, error: %ld\n",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 			 PTR_ERR(new_fwnode));
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	} else {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 		/*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 		 * Store the fwnode so we can destroy it on .remove().
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) 		 * Only store it on success, as fwnode_remove_software_node()
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 		 * is NULL safe, but not PTR_ERR safe.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 		 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) 		i2c->ltc2990_fwnode = new_fwnode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) 		ltc2990_info.fwnode = new_fwnode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 		i2c->ltc2990_client =
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 			i2c_new_scanned_device(&i2c->adapter,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) 					       &ltc2990_info,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 					       icy_ltc2990_addresses,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) 					       NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) 	}
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 	return 0;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) static void icy_remove(struct zorro_dev *z)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 	struct icy_i2c *i2c = dev_get_drvdata(&z->dev);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) 	i2c_unregister_device(i2c->ltc2990_client);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) 	fwnode_remove_software_node(i2c->ltc2990_fwnode);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 	i2c_del_adapter(&i2c->adapter);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) static const struct zorro_device_id icy_zorro_tbl[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) 	{ ZORRO_ID(VMC, 15, 0), },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 	{ 0 }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) MODULE_DEVICE_TABLE(zorro, icy_zorro_tbl);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) static struct zorro_driver icy_driver = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) 	.name           = "i2c-icy",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 	.id_table       = icy_zorro_tbl,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 	.probe          = icy_probe,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 	.remove         = icy_remove,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) module_driver(icy_driver,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 	      zorro_register_driver,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 	      zorro_unregister_driver);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) MODULE_AUTHOR("Max Staudt <max@enpas.org>");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) MODULE_DESCRIPTION("I2C bus via PCF8584 on ICY Zorro card");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) MODULE_LICENSE("GPL v2");