Lines Matching +full:static +full:- +full:beta

1 // SPDX-License-Identifier: GPL-2.0-or-later
8 This module must be considered BETA unless and until
62 static struct pci_driver sis96x_driver;
63 static struct i2c_adapter sis96x_adapter;
64 static u16 sis96x_smbus_base;
66 static inline u8 sis96x_read(u8 reg) in sis96x_read()
71 static inline void sis96x_write(u8 reg, u8 data) in sis96x_write()
79 static int sis96x_transaction(int size) in sis96x_transaction()
99 return -EBUSY; in sis96x_transaction()
124 result = -ETIMEDOUT; in sis96x_transaction()
127 /* device error - probably missing ACK */ in sis96x_transaction()
130 result = -ENXIO; in sis96x_transaction()
136 result = -EIO; in sis96x_transaction()
150 static s32 sis96x_access(struct i2c_adapter * adap, u16 addr, in sis96x_access()
173 sis96x_write(SMB_BYTE, data->byte); in sis96x_access()
182 sis96x_write(SMB_BYTE, data->word & 0xff); in sis96x_access()
183 sis96x_write(SMB_BYTE + 1, (data->word & 0xff00) >> 8); in sis96x_access()
190 dev_warn(&adap->dev, "Unsupported transaction %d\n", size); in sis96x_access()
191 return -EOPNOTSUPP; in sis96x_access()
205 data->byte = sis96x_read(SMB_BYTE); in sis96x_access()
210 data->word = sis96x_read(SMB_BYTE) + in sis96x_access()
217 static u32 sis96x_func(struct i2c_adapter *adapter) in sis96x_func()
224 static const struct i2c_algorithm smbus_algorithm = {
229 static struct i2c_adapter sis96x_adapter = {
235 static const struct pci_device_id sis96x_ids[] = {
242 static int sis96x_probe(struct pci_dev *dev, in sis96x_probe()
249 dev_err(&dev->dev, "Only one device supported.\n"); in sis96x_probe()
250 return -EBUSY; in sis96x_probe()
255 dev_err(&dev->dev, "Unsupported device class 0x%04x!\n", ww); in sis96x_probe()
256 return -ENODEV; in sis96x_probe()
261 dev_err(&dev->dev, "SiS96x SMBus base address " in sis96x_probe()
263 return -EINVAL; in sis96x_probe()
265 dev_info(&dev->dev, "SiS96x SMBus base address: 0x%04x\n", in sis96x_probe()
268 retval = acpi_check_resource_conflict(&dev->resource[SIS96x_BAR]); in sis96x_probe()
270 return -ENODEV; in sis96x_probe()
275 dev_err(&dev->dev, "SMBus registers 0x%04x-0x%04x " in sis96x_probe()
277 sis96x_smbus_base + SMB_IOSIZE - 1); in sis96x_probe()
280 return -EINVAL; in sis96x_probe()
284 sis96x_adapter.dev.parent = &dev->dev; in sis96x_probe()
290 dev_err(&dev->dev, "Couldn't register adapter!\n"); in sis96x_probe()
298 static void sis96x_remove(struct pci_dev *dev) in sis96x_remove()
307 static struct pci_driver sis96x_driver = {