Message ID | CAMHSBOWy4NdPRjw2SXFmcCF2zKwx=i79RxgHR2CLnLxpamPswQ@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, Feb 26, 2015 at 3:35 PM, Gwendal Grignou <gwendal@chromium.org> wrote: > Tested-by: Gwendal Grignou <gwendal@chromium.org> > Reviewed-by: Gwendal Grignou <gwendal@chromium.org> > > Tested on a chromebook pixel with kernel 4.0.0-rc1 and ectool using > the enclosed patch in chromiumos platform/ec tree. > I checked the lightbar is working, check the calls with "strace ectool > ...", check the sysfs interface calls. Thanks Gwendal. Series has been applied and pushed out to for-next now. Thanks all. Bring on the next batch. Javier! -Olof -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hello, On 02/27/2015 01:11 AM, Olof Johansson wrote: > On Thu, Feb 26, 2015 at 3:35 PM, Gwendal Grignou <gwendal@chromium.org> wrote: >> Tested-by: Gwendal Grignou <gwendal@chromium.org> >> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> >> >> Tested on a chromebook pixel with kernel 4.0.0-rc1 and ectool using >> the enclosed patch in chromiumos platform/ec tree. >> I checked the lightbar is working, check the calls with "strace ectool >> ...", check the sysfs interface calls. > > > Thanks Gwendal. > Thanks a lot Gwendal for testing > Series has been applied and pushed out to for-next now. > > Thanks all. Bring on the next batch. Javier! > Thanks, Fengguang's build bot found a couple of issues though so I'll post the fixes for those now. > > -Olof > Best regards, Javier -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/util/comm-dev.c b/util/comm-dev.c index cdbbbdf..1b9958d 100644 --- a/util/comm-dev.c +++ b/util/comm-dev.c @@ -13,9 +13,9 @@ #include <sys/types.h> #include <unistd.h> . +#include "ec_commands.h" #include "cros_ec_dev.h" #include "comm-host.h" -#include "ec_commands.h" . static int fd = -1; . @@ -61,9 +61,8 @@ static int ec_command_dev(int command, int version, s_cmd.version = version; s_cmd.result = 0xff; s_cmd.outsize = outsize; - s_cmd.outdata = (uint8_t *)outdata; s_cmd.insize = insize; - s_cmd.indata = indata; + memcpy(s_cmd.outdata, outdata, outsize); . r = ioctl(fd, CROS_EC_DEV_IOCXCMD, &s_cmd); if (r < 0) { @@ -83,6 +82,7 @@ static int ec_command_dev(int command, int version, strresult(s_cmd.result)); return -EECRESULT - s_cmd.result; } + memcpy(indata, s_cmd.indata, insize); . return r; } diff --git a/util/cros_ec_dev.h b/util/cros_ec_dev.h index f6f5a55..55184ca 100644 --- a/util/cros_ec_dev.h +++ b/util/cros_ec_dev.h @@ -26,11 +26,11 @@ struct cros_ec_command { uint32_t version; uint32_t command; - uint8_t *outdata; uint32_t outsize; - uint8_t *indata; uint32_t insize; uint32_t result; + uint8_t outdata[EC_PROTO2_MAX_PARAM_SIZE]; + uint8_t indata[EC_PROTO2_MAX_PARAM_SIZE]; }; . /* @@ -46,8 +46,8 @@ struct cros_ec_readmem { char *buffer; }; . -#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) +#define CROS_EC_DEV_IOC 0xEC +#define CROS_EC_DEV_IOCXCMD _IOWR(0xEC, 0, struct cros_ec_command) +#define CROS_EC_DEV_IOCRDMEM _IOWR(0xEC, 1, struct cros_ec_readmem) . #endif /* _CROS_EC_DEV_H_ */