Lines Matching full:smbus
5 * PA Semi PWRficient SMBus host driver for Apple SoCs
19 struct pasemi_smbus smbus; member
32 data->smbus.clk_div = DIV_ROUND_UP(clk_rate, 16 * frequency); in pasemi_platform_i2c_calc_clk_div()
33 if (data->smbus.clk_div < 4) in pasemi_platform_i2c_calc_clk_div()
34 return dev_err_probe(data->smbus.dev, -EINVAL, in pasemi_platform_i2c_calc_clk_div()
37 if (data->smbus.clk_div > 0xff) in pasemi_platform_i2c_calc_clk_div()
38 return dev_err_probe(data->smbus.dev, -EINVAL, in pasemi_platform_i2c_calc_clk_div()
49 struct pasemi_smbus *smbus; in pasemi_platform_i2c_probe() local
59 smbus = &data->smbus; in pasemi_platform_i2c_probe()
60 smbus->dev = dev; in pasemi_platform_i2c_probe()
62 smbus->ioaddr = devm_platform_ioremap_resource(pdev, 0); in pasemi_platform_i2c_probe()
63 if (IS_ERR(smbus->ioaddr)) in pasemi_platform_i2c_probe()
64 return PTR_ERR(smbus->ioaddr); in pasemi_platform_i2c_probe()
77 smbus->adapter.dev.of_node = pdev->dev.of_node; in pasemi_platform_i2c_probe()
78 error = pasemi_i2c_common_probe(smbus); in pasemi_platform_i2c_probe()
83 …error = devm_request_irq(smbus->dev, irq_num, pasemi_irq_handler, 0, "pasemi_apple_i2c", (void *)s… in pasemi_platform_i2c_probe()
86 smbus->use_irq = 1; in pasemi_platform_i2c_probe()
113 MODULE_DESCRIPTION("Apple/PASemi SMBus platform driver");