Kernel Newbies archive on lore.kernel.org
 help / color / Atom feed
* maintainer for this update?
@ 2019-03-28 21:53 Dave Stevens
  2019-03-28 22:28 ` Greg KH
  2019-03-29  3:22 ` Valdis Klētnieks
  0 siblings, 2 replies; 3+ messages in thread
From: Dave Stevens @ 2019-03-28 21:53 UTC (permalink / raw)
  To: kernelnewbies

In the article below about kernel updates is a reference to a driver for
a Plantower PMS7003 particulate matter sensor. I'm using this series in
air pollution monitoring and its usual interface to the computer
is over a serial line. I consequently am very curious about how and why
it would need a specific kernel module.

Can anyone refer me to more information about the originator of this
patch? I'd rather ask directly but don't know how to go about it.

TIA

Dave


https://lwn.net/Articles/782511/

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: maintainer for this update?
  2019-03-28 21:53 maintainer for this update? Dave Stevens
@ 2019-03-28 22:28 ` Greg KH
  2019-03-29  3:22 ` Valdis Klētnieks
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2019-03-28 22:28 UTC (permalink / raw)
  To: Dave Stevens; +Cc: kernelnewbies

On Thu, Mar 28, 2019 at 02:53:28PM -0700, Dave Stevens wrote:
> In the article below about kernel updates is a reference to a driver for
> a Plantower PMS7003 particulate matter sensor. I'm using this series in
> air pollution monitoring and its usual interface to the computer
> is over a serial line. I consequently am very curious about how and why
> it would need a specific kernel module.
> 
> Can anyone refer me to more information about the originator of this
> patch? I'd rather ask directly but don't know how to go about it.

scripts/get_maintainer.pl is your friend :)

It can be used on any kernel file to find out who is responsible for it.

hope this helps,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: maintainer for this update?
  2019-03-28 21:53 maintainer for this update? Dave Stevens
  2019-03-28 22:28 ` Greg KH
@ 2019-03-29  3:22 ` Valdis Klētnieks
  1 sibling, 0 replies; 3+ messages in thread
From: Valdis Klētnieks @ 2019-03-29  3:22 UTC (permalink / raw)
  To: Dave Stevens; +Cc: kernelnewbies

On Thu, 28 Mar 2019 14:53:28 -0700, Dave Stevens said:
> In the article below about kernel updates is a reference to a driver for
> a Plantower PMS7003 particulate matter sensor. I'm using this series in
> air pollution monitoring and its usual interface to the computer
> is over a serial line. I consequently am very curious about how and why
> it would need a specific kernel module.

A quick look at the driver shows that it apparently does at least
a little bit of the heavy lifting for you - rather than you have to do all the
serial I/O interpretation yourself in userspace, it will handle checksums and
channels and so on for you.

+enum pms7003_cmd {
+       CMD_WAKEUP,
+       CMD_ENTER_PASSIVE_MODE,
+       CMD_READ_PASSIVE,
+       CMD_SLEEP,
+};
+
+/*
+ * commands have following format:
+ *
+ * +------+------+-----+------+-----+-----------+-----------+
+ * | 0x42 | 0x4d | cmd | 0x00 | arg | cksum msb | cksum lsb |
+ * +------+------+-----+------+-----+-----------+-----------+
+ */
+static const u8 pms7003_cmd_tbl[][PMS7003_CMD_LENGTH] = {
+       [CMD_WAKEUP] = { 0x42, 0x4d, 0xe4, 0x00, 0x01, 0x01, 0x74 },
+       [CMD_ENTER_PASSIVE_MODE] = { 0x42, 0x4d, 0xe1, 0x00, 0x00, 0x01, 0x70 },
+       [CMD_READ_PASSIVE] = { 0x42, 0x4d, 0xe2, 0x00, 0x00, 0x01, 0x71 },
+       [CMD_SLEEP] = { 0x42, 0x4d, 0xe4, 0x00, 0x00, 0x01, 0x73 },
+};

So you can send 'wakeup' or 'read' and it will send the strings, and
then read back data and complete the I/O when enough bytes have
arrived.

There's also some probing in there to deal with device tree etc.

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-28 21:53 maintainer for this update? Dave Stevens
2019-03-28 22:28 ` Greg KH
2019-03-29  3:22 ` Valdis Klētnieks

Kernel Newbies archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kernelnewbies/0 kernelnewbies/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kernelnewbies kernelnewbies/ https://lore.kernel.org/kernelnewbies \
		kernelnewbies@kernelnewbies.org kernelnewbies@archiver.kernel.org
	public-inbox-index kernelnewbies


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernelnewbies.kernelnewbies


AGPL code for this site: git clone https://public-inbox.org/ public-inbox