lkml.org 
[lkml]   [2015]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 4/7] platform/chrome: Add Chrome OS EC userspace device interface
Hello Olof,

Thanks a lot for your feedback.

On 02/26/2015 02:13 AM, Gwendal Grignou wrote:
> Olof,
>
> I think the way Javier did it is fine, the 'major' of the ioctl is
> 0xEC, from ':'.
>
> Gwendal.
>

As Gwendal said, I deliberately changed the IOCTL mayor number to
make it different in both kernels.

downstream:

#define CROS_EC_DEV_IOC ':'
#define CROS_EC_DEV_IOCXCMD _IOWR(':', 0, struct cros_ec_command)
#define CROS_EC_DEV_IOCRDMEM _IOWR(':', 1, struct cros_ec_readmem)

mainline:

#define CROS_EC_DEV_IOC 0xEC
#define CROS_EC_DEV_IOCXCMD _IOWR(CROS_EC_DEV_IOC, 0, struct cros_ec_command)
#define CROS_EC_DEV_IOCRDMEM _IOWR(CROS_EC_DEV_IOC, 1, struct cros_ec_readmem)

I can also do what you suggested and keep ':' as the major and use 2/3
as command numbers but I just think 0xEC is a much nicer major for the
interface to talk with the Embedded Controller and it was available ;)

Best regards,
Javier


\
 
 \ /
  Last update: 2015-02-26 10:41    [W:0.240 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site