linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <zbr@ioremap.net>
To: Greg KH <greg@kroah.com>, Akira Shimahara <akira215corp@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/5] w1_therm: adding sysfs entry to check device power
Date: Wed, 29 Apr 2020 18:18:14 +0300	[thread overview]
Message-ID: <330221588173223@mail.yandex.ru> (raw)
In-Reply-To: <20200429134655.GB2132814@kroah.com>

Hi

29.04.2020, 16:47, "Greg KH" <greg@kroah.com>:

>>  +What: /sys/bus/w1/devices/.../w1_slave
>>  +Date: Apr 2020
>>  +Contact: Akira Shimahara <akira215corp@gmail.com>
>>  +Description:
>>  + (RW) return the temperature in 1/1000 degC.
>>  + *read*: return 2 lines with the hexa output data sent on the
>>  + bus, return the CRC check and temperature in 1/1000 degC
>
> the w1_slave file returns a temperature???
>
> And sysfs is 1 value-per-file, not multiple lines.

It was 'content crc' previously, and probably a good idea would be to add just one file with 'content'

> And as this is a temperature, what's wrong with the iio interface that
> handles temperature already? Don't go making up new userspace apis when
> we already have good ones today :)

What is that?
w1 always had a sysfs files for its contents whether it is converted temperature or raw bytes data,
there is also netlink interface which is there since the day one. 

>>  + *write* :
>>  + * `0` : save the 2 or 3 bytes to the device EEPROM
>>  + (i.e. TH, TL and config register)
>>  + * `9..12` : set the device resolution in RAM
>>  + (if supported)
>
> I don't understand these write values, how do they match up to a
> temperature readin?

You kind of writing to device about how to convert its raw content into readable content, which will eventually become a temperature

  parent reply	other threads:[~2020-04-29 15:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 13:32 [PATCH v3 2/5] w1_therm: adding sysfs entry to check device power Akira Shimahara
2020-04-29 13:46 ` Greg KH
2020-04-29 13:57   ` _ Akira shimahara
2020-04-29 15:18   ` Evgeniy Polyakov [this message]
2020-04-30 10:34     ` [PATCH v3 2/5] w1_therm: adding sysfs entry to check device power Akira shimahara
2020-04-30 11:21       ` Greg KH
2020-04-30 13:52         ` Akira shimahara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=330221588173223@mail.yandex.ru \
    --to=zbr@ioremap.net \
    --cc=akira215corp@gmail.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).