Skip to content

Commit eb8470d

Browse files
iankagregkh
authored andcommitted
wire: export w1_touch_bit
The w1_ds28e17 driver from the next part of this patch needs to emit single-bit read timeslots to the DS28E17. The w1 subsystem already has this function but it is not exported outside drivers/w1/w1_io.c This subpatch exports the w1_touch_bit symbol with EXPORT_SYMBOL_GPL, same as the other exported symbols in drivers/w1/w1_io.c May be also useful later for writing drivers for other Onewire chips which do single-bit communication. Signed-off-by: Jan Kandziora <jjj@gmx.de> Acked-by: Evgeniy Polyakov <zbr@ioremap.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e701c67 commit eb8470d

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/w1/w1_io.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static u8 w1_read_bit(struct w1_master *dev);
5858
* @dev: the master device
5959
* @bit: 0 - write a 0, 1 - write a 0 read the level
6060
*/
61-
static u8 w1_touch_bit(struct w1_master *dev, int bit)
61+
u8 w1_touch_bit(struct w1_master *dev, int bit)
6262
{
6363
if (dev->bus_master->touch_bit)
6464
return dev->bus_master->touch_bit(dev->bus_master->data, bit);
@@ -69,6 +69,7 @@ static u8 w1_touch_bit(struct w1_master *dev, int bit)
6969
return 0;
7070
}
7171
}
72+
EXPORT_SYMBOL_GPL(w1_touch_bit);
7273

7374
/**
7475
* w1_write_bit() - Generates a write-0 or write-1 cycle.

‎include/linux/w1.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ void w1_unregister_family(struct w1_family *family);
293293
w1_unregister_family)
294294

295295
u8 w1_triplet(struct w1_master *dev, int bdir);
296+
u8 w1_touch_bit(struct w1_master *dev, int bit);
296297
void w1_write_8(struct w1_master *, u8);
297298
u8 w1_read_8(struct w1_master *);
298299
int w1_reset_bus(struct w1_master *);

0 commit comments

Comments
 (0)