]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
wire: export w1_touch_bit
authorJan Kandziora <jjj@gmx.de>
Wed, 20 Sep 2017 21:52:45 +0000 (23:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Oct 2017 08:29:22 +0000 (10:29 +0200)
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>
drivers/w1/w1_io.c
include/linux/w1.h

index d191e1f8057993bb9a76ba38a540ff6a6178ce5f..075d120e7b881b563c88f37e8ef8915019438da8 100644 (file)
@@ -58,7 +58,7 @@ static u8 w1_read_bit(struct w1_master *dev);
  * @dev:       the master device
  * @bit:       0 - write a 0, 1 - write a 0 read the level
  */
-static u8 w1_touch_bit(struct w1_master *dev, int bit)
+u8 w1_touch_bit(struct w1_master *dev, int bit)
 {
        if (dev->bus_master->touch_bit)
                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)
                return 0;
        }
 }
+EXPORT_SYMBOL_GPL(w1_touch_bit);
 
 /**
  * w1_write_bit() - Generates a write-0 or write-1 cycle.
index 5b2972946dda5f9ad415f1eaeaab67743a5cc0f0..694101f744c7dca5fb5aa97cfa2bd88b002da322 100644 (file)
@@ -293,6 +293,7 @@ void w1_unregister_family(struct w1_family *family);
                        w1_unregister_family)
 
 u8 w1_triplet(struct w1_master *dev, int bdir);
+u8 w1_touch_bit(struct w1_master *dev, int bit);
 void w1_write_8(struct w1_master *, u8);
 u8 w1_read_8(struct w1_master *);
 int w1_reset_bus(struct w1_master *);