[Nut-upsdev] megatec over USB - new driver patch

Andrey Lelikov nut-driver at lelik.org
Tue Dec 5 16:11:48 CET 2006


Arjen de Korte wrote:
>>      I just dont want the results of my work to disappear into void. Is
>> it something that can go into main tree? Please let me know what you
>> think. I can also do all the grunt work (write man page, add to a list
>> of supported devices, change debian USB hotplug script, etc) if this
>> driver will be included. Thanks.
>>     
>
> Your effort to support this UPS are appreciated. The only remark I want to
> make, is that I don't think it is needed to change the present megatec
> driver and preferably, I would refrain from doing so. The only thing
> needed, is a new serial_usb.c that provides (a subset of) the standard
> serial I/O functions with the same name. Just ignore the parameters that
> are not used and provide stubs for the functions not implemented. With a
> bit of luck, we might be able to reuse that for other UPS'es that use
> similar hardware, but speak a different protocol. Then at link time you
> can decide whether to use the serial.o or serial_usb.o object to decide
> for what kind of interface you're building. The only issue that remains
> now, is that the driver should report at startup which version it is. This
> can be handled nicely by using the value of 'progname' in the
> upsdrv_banner() function in the megatec.c file. Yesterday I committed a
> change to make the value of this parameter available at the time
> upsdrv_banner() is called.
>
> Best regards, Arjen
>   
Makes sense, but this will require changes into makefile.am - serial is 
linked with every driver and will conflict with serial_usb.c ...

 



More information about the Nut-upsdev mailing list