**** BEGIN LOGGING AT Sat Aug 06 02:59:58 2016 Aug 06 12:03:34 hi Aug 06 12:03:58 jkridner, alexhiam please check mailing list Aug 06 18:49:51 m_w, There? Aug 06 18:58:06 Wormo, there? I have a doubt regarding git Aug 06 18:58:15 hi, ask away Aug 06 18:59:22 Wormo, My contribution graph is not reflecting my commits. It is showing that I have had no commits or coding streaks since jun15 Aug 06 18:59:33 https://github.com/chanakya-vc?tab=overview&from=2016-08-07 Aug 06 19:00:08 that is because you are not committing to the master Aug 06 19:00:25 ohh m_w Aug 06 19:00:32 if you merge to master I think they will show up Aug 06 19:00:35 yes should count then Aug 06 19:00:39 https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/ Aug 06 19:00:49 4th point Aug 06 19:01:20 Ohh Aug 06 19:02:14 bradfa pointed out this to me and told me that I had not been showing many commits since mid sem evaluations. I got worried as to why that was the case Aug 06 19:02:54 Anyway mystery solved Aug 06 19:03:45 m_w, I am done with the driver for i2c. Take a look:https://github.com/chanakya-vc/PRU-I2C_SPI_master/blob/wip_on_spi/I2C/I2C_Driver/pru0_i2c-subsystem.c Aug 06 19:04:08 Working on the firmware right now. Aug 06 19:04:54 okay Aug 06 19:05:51 m_w, I looked at many examples and all of them had this for loop in the main xfer function with a parameter called num in it. I think this allows for multibyte transfer Aug 06 19:06:44 I have a few other doubts also Aug 06 19:09:08 m_w, 1) The address is a u16 buffer. But I will be only doing 7 bit addressing so I have assigned it to a uint8 variable. Still I am not sure how the address will come in that uint variable. I mean the last bit has to be the flag bit. So i need to just bitbang 7 out of the 8 bits in the address, ignore one and then bitbang the flag bit Aug 06 19:09:54 I think the MSB will be the one to be ignored? What do you think m_w ? Aug 06 19:10:55 actually i2c also has extended addressing modes Aug 06 19:11:03 http://www.i2c-bus.org/addressing/10-bit-addressing/ Aug 06 19:11:37 http://www.i2c-bus.org/addressing/ Aug 06 19:11:39 I know m_w . It was an extended goal in my proposal Aug 06 19:11:47 Like post GSOC Aug 06 19:12:28 So right now got to work on 7 bit addressing only m_w Aug 06 19:12:55 so you ingnore the bit 7-15 in this mode Aug 06 19:14:07 I am not sure as to the most efficient way to do that m_w ? Like reading it as uint 8 variable will most likely cause errors. I think I can get my firmware to ignore it Aug 06 19:14:38 Like start bitbanging from the 6 bit onwards till the end Aug 06 19:16:12 just send the address as u16 to the PRU and go from there Aug 06 19:16:19 Okay m_w Aug 06 19:17:05 there is no reason why the shared memory has to be read/written in bytes Aug 06 19:17:20 Another doubt I am not sure about what does the class parameter of the i2c_adapter mean.http://lxr.free-electrons.com/source/drivers/i2c/busses/i2c-robotfuzz-osif.c#L151 Aug 06 19:20:13 it changes the way transactions are handled Aug 06 19:23:41 just use I2C_CLASS_DEPRECATED Aug 06 19:24:28 Okay m_w Aug 06 19:24:40 or don't set it at all Aug 06 19:25:17 not setting is probably best actually Aug 06 19:26:49 Okay m_w :P Aug 06 19:30:46 Next thing I am again not sure about the .functionality parameter in the algorithm struct m_w Aug 06 19:31:00 http://lxr.free-electrons.com/source/drivers/i2c/busses/i2c-robotfuzz-osif.c#L122 Aug 06 19:35:55 power just went out for a second here Aug 06 19:36:53 Ohh Aug 06 19:37:36 the .functionality parameter you broadcast the driver abilities Aug 06 19:38:47 I2C_FUNC_I2C is fine for your driver Aug 06 19:39:43 m_w,Okay so I set the .functionality= I2C_FUNC_I2C Aug 06 19:39:50 no Aug 06 19:39:58 Then m_w ? Aug 06 19:40:06 you pass a function pointer Aug 06 19:40:12 I thought this was a macro Aug 06 19:40:20 or something Aug 06 19:40:25 the function returns I2C_FUNC_I2C Aug 06 19:40:46 no that is a function pointer Aug 06 19:41:37 so .functionality= my_function and this function is simply returning I2C_FUNC_I2C? Aug 06 19:41:51 exactly Aug 06 19:44:15 Hmmn m_w basic doubt is that my_function would have to be type of I2C_FUNC_I2C right inorder to return a pointer to the function right? Aug 06 19:45:06 the function has to be of the type in the struct Aug 06 19:46:11 like here http://lxr.free-electrons.com/source/drivers/hid/hid-cp2112.c#L745 Aug 06 19:46:17 m_w, It is u32 Aug 06 19:46:22 the name of the function will be the pointer Aug 06 19:46:44 not the return type Aug 06 19:47:26 http://lxr.free-electrons.com/source/include/linux/i2c.h#L408 Aug 06 19:48:37 Okay so it is always a u32? Aug 06 19:48:40 the function return type and parameters must match the template in the struct Aug 06 19:48:43 yes Aug 06 19:48:55 Okay m_w Aug 06 19:49:44 Last doubt, the dtc that there is for spi would work for i2c also right provided I change the names and remove the spidev registrations right? Aug 06 19:49:48 m_w, ^ Aug 06 19:50:28 yeah in essence Aug 06 19:51:53 you don't need a special entry for the i2c dev userspace interface though Aug 06 19:53:24 Okay so need to register for any userspace interface for i2c then. Got it Aug 06 19:54:22 it is automatic if the correct driver is enabled Aug 06 19:55:15 you may want to consider passing the shared memory offset via the devicetree so that it is not hardcoded in your driver Aug 06 19:56:01 Okay m_w . I guess I will first get it to work before trying all this. Aug 06 19:56:08 and you should also consider ioremap the whole range at once and offsets within the range Aug 06 19:56:39 this will be good for after you get things working Aug 06 19:57:04 Yeah m_w . Very less time remaining now :P Aug 06 19:57:07 we need to get back and add more words per transaction on the SPI driver as well Aug 06 19:57:21 Yeah that is also there. :( Aug 06 19:57:47 I am going to complete the firmware by tomorrow Aug 06 19:57:57 okay Aug 06 19:58:29 And then maybe start working on SPI multibyte from monday. Hopefully finish everything before nect weeks meeting Aug 06 19:59:15 it is crunch time, let see how well you work under pressure :) Aug 06 19:59:22 lets Aug 06 20:00:05 remember how confident you were during the proposal? :) Aug 06 20:00:48 m_w, I work the best under pressure. I completed the driver for i2c from scratch in a day where it took me nearly a month for SPI :P Aug 06 20:02:04 I so was. And you were so right when you told that there are so many unexpected delays in kernel development m_w Aug 06 20:02:21 I was kind of naive two months back :P Aug 06 20:05:27 power went down again Aug 06 20:06:10 gonna shut down my PC before I damage my hard drive Aug 06 20:06:27 need to order UPS Aug 06 20:06:34 bye for now m_w_ Aug 06 20:06:42 I will check in later Aug 06 20:06:51 Bye m_w_ Aug 06 20:07:05 good luck chanakya_vc **** ENDING LOGGING AT Sun Aug 07 02:59:57 2016