lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAJ0PZbQu3N7Bs+ewf7vP=bN9B13xZSQYrnhqT733O1m5gEBqGg@mail.gmail.com>
Date:	Mon, 14 Nov 2011 17:10:42 +0900
From:	MyungJoo Ham <myungjoo.ham@...sung.com>
To:	LKML <linux-kernel@...r.kernel.org>, lm-sensors@...sensors.org
Cc:	Jean Delvare <khali@...ux-fr.org>,
	Guenter Roeck <guenter.roeck@...csson.com>,
	dg77.kim@...sung.com, kyungmin.park@...sung.com,
	함명주 <myungjoo.ham@...il.com>,
	Ben Hutchings <bhutchings@...arflare.com>
Subject: [PATCH v2 0/2] HWMON: add in-kernel interfaces to read sensor values.

We have been reading hwmon values (TMU, the SoC-core temperature sensor,
and NTC, the ambient or battery surface temperature sensor) for
Charger-Manager. However, because hwmon does not have in-kernel interface,
we have been using undesired method, including "../../../fs/*.h".

This patch is to provide in-kernel interface for hwmon:
hwmon_get_value and hwmon_set_value. In order to use these two functions,
a) the hwmon driver should provide its sysfs attributes to hwmon framework,
and b) the hwmon_{get/set}_value caller should get the hwmon property pointer
with hwmon_find_device(dev) or hwmon_find_device_name(device-name).

A hwmon driver may provide its sysfs attributes with
hwmon_register_property(hwmon, attr) or
hwmon_register_properties(hwmon, attr_group)

In patch 2/2, we have added "register_property" for NTC-thermistor,
Exynos4-TMU, and S3C-HWMON drivers.

As soon as the server synchronizes git repositories, you can see how
hwmon_get_value() is used at:
http://git.infradead.org/users/kmpark/linux-2.6-samsung/shortlog/refs/heads/charger-manager


MyungJoo Ham (2):
  HWMON: add interfaces to read/write hwmon values inside kernel
  HWMON: support in-kernel HWMON API: NTC, S3C-HWMON, Exynos4-TMU

 drivers/hwmon/exynos4_tmu.c    |    2 +
 drivers/hwmon/hwmon.c          |  353 +++++++++++++++++++++++++++++++++++++++-
 drivers/hwmon/ntc_thermistor.c |    2 +
 drivers/hwmon/s3c-hwmon.c      |   10 +
 include/linux/hwmon.h          |   34 ++++
 5 files changed, 400 insertions(+), 1 deletions(-)

-- 
1.7.4.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

Powered by Openwall GNU/*/Linux Powered by OpenVZ