12 #include <linux/module.h>
14 #include <linux/slab.h>
21 #include "../w1_int.h"
23 static void w1_gpio_write_bit_dir(
void *
data,
u8 bit)
33 static void w1_gpio_write_bit_val(
void *data,
u8 bit)
40 static u8 w1_gpio_read_bit(
void *data)
71 pdata->
pin = of_get_gpio(np, 0);
86 struct w1_bus_master *master;
90 err = w1_gpio_probe_dt(pdev);
94 pdata = pdev->
dev.platform_data;
99 master = kzalloc(
sizeof(
struct w1_bus_master),
GFP_KERNEL);
114 master->data =
pdata;
115 master->read_bit = w1_gpio_read_bit;
119 master->write_bit = w1_gpio_write_bit_val;
122 master->write_bit = w1_gpio_write_bit_dir;
127 goto free_gpio_ext_pu;
135 platform_set_drvdata(pdev, master);
152 struct w1_bus_master *master = platform_get_drvdata(pdev);
191 #define w1_gpio_suspend NULL
192 #define w1_gpio_resume NULL
206 static int __init w1_gpio_init(
void)
211 static void __exit w1_gpio_exit(
void)