Giuseppe Corbelli
2014-Jun-23 14:55 UTC
[Nut-upsdev] [PATCH] Support for ASEM UPS on Linux/i2c
On 18/06/2014 04:17, Charles Lepple wrote:> On Jun 13, 2014, at 2:53 AM, Giuseppe Corbelli <giuseppe.corbelli at copanitalia.com> wrote: > >> As said in previous mail, I just finished a first working version of a driver for the UPS found on ASEM PB1300 device >> (http://www.asem.it/prodotti/industrial-automation/box-pcs/performance/pb1300/) >> Linux only, accessed through i2c/SMBUS. >> If you can spare some time, please review. Expecially my autotools skills are ehm... a bit rusty. > > Hi Giuseppe, > > I am not an autoconf expert, so I will admit that my first inclination was > to try and build it on a number of different boxes, and see what breaks. I > don?t see any red flags at the moment. > > However, the patch file seems malformed - I got errors when passing it to ?git apply?. > > Did the patch file get edited after you generated it? What version did you branch from?Yes, I edited to avoid patching the .in generated files. Must have done something wrong. Nevermind, please try the one attached, just created by git diff -p 80d9534 configure.ac data/driver.list.in drivers/Makefile.am drivers/asem.c > asem.patch Just applied it on current master (80d9534a133da170cade150700407920450a9753) and seems ok. -- Giuseppe Corbelli WASP Software Engineer, Copan Italia S.p.A Phone: +390303666318 Fax: +390302659932 E-mail: giuseppe.corbelli at copanitalia.com -------------- next part -------------- A non-text attachment was scrubbed... Name: asem.patch Type: text/x-patch Size: 15928 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20140623/a9cf5a66/attachment.bin>
Charles Lepple
2014-Jul-07 13:03 UTC
[Nut-upsdev] [PATCH] Support for ASEM UPS on Linux/i2c
Giuseppe Corbelli <giuseppe.corbelli <at> copanitalia.com> writes:> Nevermind, please try the one attached, just created by > > git diff -p 80d9534 configure.ac data/driver.list.in drivers/Makefile.am > drivers/asem.c > asem.patch > > Just applied it on current master (80d9534a133da170cade150700407920450a9753) > and seems ok.Sorry I did not test this sooner - this went to Gmane but not to my email. If you have time, could you please write up a quick man page for this driver? Also, there seem to be some missing symbols and include files: http://buildbot.networkupstools.org/public/nut/waterfall?branch=asem_i2c
Charles Lepple
2014-Jul-07 13:15 UTC
[Nut-upsdev] [PATCH] Support for ASEM UPS on Linux/i2c
Charles Lepple <clepple <at> gmail.com> writes:> http://buildbot.networkupstools.org/public/nut/waterfall?branch=asem_i2c >Not sure about the '#include <config.h>' - should probably just be '#include "main.h"'? See skel.c for details.
Giuseppe Corbelli
2014-Jul-07 14:10 UTC
[Nut-upsdev] [PATCH] Support for ASEM UPS on Linux/i2c
On 07/07/2014 15:03, Charles Lepple wrote:> Giuseppe Corbelli <giuseppe.corbelli <at> copanitalia.com> writes: > >> Nevermind, please try the one attached, just created by >> >> git diff -p 80d9534 configure.ac data/driver.list.in drivers/Makefile.am >> drivers/asem.c > asem.patch >> >> Just applied it on current master (80d9534a133da170cade150700407920450a9753) >> and seems ok. > > Sorry I did not test this sooner - this went to Gmane but not to my email. > If you have time, could you please write up a quick man page for this driver? > > Also, there seem to be some missing symbols and include files: > > http://buildbot.networkupstools.org/public/nut/waterfall?branch=asem_i2cThe problem is that linux/i2c-dev.h must come from libi2c-dev to define the required functions. Same header is part of the kernel, but without required functions. Changed the configure.ac check to look for the functions, not just the header. To build the driver you'll need libi2c-dev package (part of i2c-tools) on debian. Also removed the #include <config.h> as you suggested. -- Giuseppe Corbelli WASP Software Engineer, Copan Italia S.p.A Phone: +390303666318 Fax: +390302659932 E-mail: giuseppe.corbelli at copanitalia.com -------------- next part -------------- A non-text attachment was scrubbed... Name: asem.patch Type: text/x-patch Size: 1069 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20140707/590fc20a/attachment.bin>
Giuseppe Corbelli
2014-Jul-14 09:43 UTC
[Nut-upsdev] [PATCH] Support for ASEM UPS on Linux/i2c
On 07/07/2014 15:03, Charles Lepple wrote:> Giuseppe Corbelli <giuseppe.corbelli <at> copanitalia.com> writes: > >> Nevermind, please try the one attached, just created by >> >> git diff -p 80d9534 configure.ac data/driver.list.in drivers/Makefile.am >> drivers/asem.c > asem.patch >> >> Just applied it on current master (80d9534a133da170cade150700407920450a9753) >> and seems ok. > > Sorry I did not test this sooner - this went to Gmane but not to my email. > If you have time, could you please write up a quick man page for this driver?Saw you merged in master the code and the man page I should have written. Here's a small patch, adds some useful info to the man page and (most important, of course) my name to the AUTHORS file. -- Giuseppe Corbelli WASP Software Engineer, Copan Italia S.p.A Phone: +390303666318 Fax: +390302659932 E-mail: giuseppe.corbelli at copanitalia.com -------------- next part -------------- A non-text attachment was scrubbed... Name: asem_man.patch Type: text/x-patch Size: 2078 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20140714/cb8691b7/attachment.bin>