[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1420554596-10250-1-git-send-email-marius.gorski@gmail.com>
Date: Tue, 6 Jan 2015 15:29:54 +0100
From: Mariusz Gorski <marius.gorski@...il.com>
To: Evgeniy Polyakov <zbr@...emap.net>, David Fries <David@...es.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH 0/2] w1: slaves: w1_therm: Add sysfs entry for current temperature
DS18B20 and it's brothers are pretty popular in the RaspberryPi world
when it comes to temperature measurement. All tutorials on the Internet
use the same way of parsing the output of the w1_slave sysfs file.
These patches add a dedicated sysfs entry called 'temp' whose only job
is to output the current temperature.
What could be improved here is the way how dev->bus_mutex is locked/unlocked,
which is split right now between two functions - maybe it would be better
to move all dev->bus_mutex locking into read_rom() and introduce another
mutex for protecting the slave's structures (e.g. family_data).
Mariusz Gorski (2):
w1: slaves: w1_therm: Extract read_rom function
w1: slaves: w1_therm: Add temp attribute
drivers/w1/slaves/w1_therm.c | 83 ++++++++++++++++++++++++++++++++++----------
1 file changed, 65 insertions(+), 18 deletions(-)
--
2.2.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists