Lines Matching refs:rx6110

176 	struct rx6110_data *rx6110 = dev_get_drvdata(dev);  in rx6110_set_time()  local
185 ret = regmap_update_bits(rx6110->regmap, RX6110_REG_CTRL, in rx6110_set_time()
190 ret = regmap_bulk_write(rx6110->regmap, RX6110_REG_SEC, data, in rx6110_set_time()
196 ret = regmap_update_bits(rx6110->regmap, RX6110_REG_FLAG, in rx6110_set_time()
202 ret = regmap_update_bits(rx6110->regmap, RX6110_REG_CTRL, in rx6110_set_time()
215 struct rx6110_data *rx6110 = dev_get_drvdata(dev); in rx6110_get_time() local
220 ret = regmap_read(rx6110->regmap, RX6110_REG_FLAG, &flags); in rx6110_get_time()
231 ret = regmap_bulk_read(rx6110->regmap, RX6110_REG_SEC, data, in rx6110_get_time()
261 static int rx6110_init(struct rx6110_data *rx6110) in rx6110_init() argument
263 struct rtc_device *rtc = rx6110->rtc; in rx6110_init()
267 ret = regmap_update_bits(rx6110->regmap, RX6110_REG_EXT, in rx6110_init()
272 ret = regmap_register_patch(rx6110->regmap, rx6110_default_regs, in rx6110_init()
277 ret = regmap_read(rx6110->regmap, RX6110_REG_FLAG, &flags); in rx6110_init()
298 ret = regmap_update_bits(rx6110->regmap, RX6110_REG_FLAG, in rx6110_init()
312 static int rx6110_probe(struct rx6110_data *rx6110, struct device *dev) in rx6110_probe() argument
316 rx6110->rtc = devm_rtc_device_register(dev, in rx6110_probe()
320 if (IS_ERR(rx6110->rtc)) in rx6110_probe()
321 return PTR_ERR(rx6110->rtc); in rx6110_probe()
323 err = rx6110_init(rx6110); in rx6110_probe()
327 rx6110->rtc->max_user_freq = 1; in rx6110_probe()
346 struct rx6110_data *rx6110; in rx6110_spi_probe() local
356 rx6110 = devm_kzalloc(&spi->dev, sizeof(*rx6110), GFP_KERNEL); in rx6110_spi_probe()
357 if (!rx6110) in rx6110_spi_probe()
360 rx6110->regmap = devm_regmap_init_spi(spi, &regmap_spi_config); in rx6110_spi_probe()
361 if (IS_ERR(rx6110->regmap)) { in rx6110_spi_probe()
363 return PTR_ERR(rx6110->regmap); in rx6110_spi_probe()
366 spi_set_drvdata(spi, rx6110); in rx6110_spi_probe()
368 return rx6110_probe(rx6110, &spi->dev); in rx6110_spi_probe()
423 struct rx6110_data *rx6110; in rx6110_i2c_probe() local
432 rx6110 = devm_kzalloc(&client->dev, sizeof(*rx6110), GFP_KERNEL); in rx6110_i2c_probe()
433 if (!rx6110) in rx6110_i2c_probe()
436 rx6110->regmap = devm_regmap_init_i2c(client, &regmap_i2c_config); in rx6110_i2c_probe()
437 if (IS_ERR(rx6110->regmap)) { in rx6110_i2c_probe()
439 return PTR_ERR(rx6110->regmap); in rx6110_i2c_probe()
442 i2c_set_clientdata(client, rx6110); in rx6110_i2c_probe()
444 return rx6110_probe(rx6110, &client->dev); in rx6110_i2c_probe()