[Gta04-owner] Goldelico Replicant 4.2 Update (suspend + accel)

Alexandre Roumiantsev ran at mail.wplus.net
Sat May 17 13:45:49 CEST 2014


Hello

Follow Lukas and Nicolaus idea I get subj with LIS302 accel working. At
least same as Lukas announcement:

> * Sensors: basic support for acceleration sensor (other sensors might
>   crash if used)
>   --> Good test cases are the "Free Fall" game and "Sensor Readout" app,
>       as found in F-Droid.

I can see acceleroment info with  "Sensor Readout" and play at "Free
Fall" game.
Find in attachment the patch.

Alexandre.  
> 
> ______________________________________________________________________
> Hello
> 
> Thank Lukas. I have seen it.
> Moreover before I seen it I prepare my own one and try to publish it,
> but something happens with goldelico's server at Ester period. I repeat
> it below, it looks that you have not get it:
> 
> > Hello,
> > 
> > 1) Please, any help. After some experiments with LIS302 I find a way:
> > 
> > --- ../replicant-4.2/kernel/goldelico/gta04/arch/arm/configs/gta04_defconfig    2014-04-08 18:06:18.613605675 +0400
> > +++
> > kernel/goldelico/gta04/arch/arm/configs/gta04_defconfig     2014-04-20
> > 20:50:31.286762778 +0400
> > @@ -1198,7 +1200,7 @@
> >  #
> >  # Misc devices
> >  #
> > -# CONFIG_SENSORS_LIS3LV02D is not set
> > +CONFIG_SENSORS_LIS3LV02D=y
> >  # CONFIG_AD525X_DPOT is not set
> >  # CONFIG_ATMEL_PWM is not set
> >  # CONFIG_DUMMY_IRQ is not set
> > @@ -1238,7 +1240,7 @@
> >  #
> >  # CONFIG_TI_ST is not set
> >  # CONFIG_SENSORS_LIS3_SPI is not set
> > -# CONFIG_SENSORS_LIS3_I2C is not set
> > +CONFIG_SENSORS_LIS3_I2C=y 
> >  
> >  #
> >  # Altera FPGA firmware download module
> > --- ../replicant-4.2/kernel/goldelico/gta04/arch/arm/mach-omap2/board-omap3gta04.c      2014-04-18 19:37:43.203259000 +0400
> > +++ kernel/goldelico/gta04/arch/arm/mach-omap2/board-omap3gta04.c
> > 2014-04-20 20:51:57.047194067 +0400
> > @@ -638,6 +638,8 @@
> >  static struct regulator_consumer_supply gta04_vaux2_supply[] = {
> >         REGULATOR_SUPPLY("vaux2", "2-0068"),
> >         REGULATOR_SUPPLY("vaux2", "2-001e"),
> > +       REGULATOR_SUPPLY("Vdd_IO", "2-001d"),
> >  };
> >  
> >  static struct regulator_init_data gta04_vaux2 = {
> > @@ -1157,7 +1159,12 @@
> >  #endif
> >  #if defined(CONFIG_INPUT_BMA150) ||
> > defined(CONFIG_INPUT_BMA150_MODULE)
> >  {
> > -       I2C_BOARD_INFO("bma150", 0x41), /* supports our bma180 */
> > +       I2C_BOARD_INFO("bma150", 0x41),  /*supports our bma180 */
> > +},
> > +#endif
> > +#if defined(CONFIG_SENSORS_LIS3_I2C)
> > +{
> > +       I2C_BOARD_INFO("lis3lv02d", 0x1d),      /* supports our lis302
> > */
> >  },
> >  #endif
> >  #if defined(CONFIG_SENSORS_HMC5843) ||
> > defined(CONFIG_SENSORS_HMC5843_MODULE)
> > 
> > which allow to me get input node in /sys/class/input/input*
> > However next step still unsuccessful. In case that I am not sure in
> > above, Please any help, especially with  REGULATOR_SUPPLY("Vdd_IO",
> > "2-001d"). Is it correct place? I else get error message about "Vdd"
> > regulator - what it meens?
> >  
> > > Hi,
> > > 
> > > as Nikolaus said, you proably have to edit the GTA04 boardfile
> > > (arch/arm/mach-omap2/board-omap3gta04.c), to correctly initialize
> > the
> > > LIS302 driver.
> > > See how the BMA180 (bma150 driver) is initialized as a reference:
> > > https://github.com/OpenPhoenux/gta04-kernel/blob/3.12-replicant4/arch/arm/mach-omap2/board-omap3gta04.c#L1158
> > > 
> > > Also I will try to figure out why the system doesn't boot if a
> > sensor
> > > is not found and try to fix it, so you could at least boot your
> > system
> > > with my patches applied.
> > 
> > 2) In case that I get same behavior with patch above and Lukas
> > patches, 
> > I investigate a reason and found that simple check was missed and
> > patch below
> > solve the problem:
> > --- ../replicant-4.2/device/goldelico/gta04/libsensors/gta04_sensors.c  2014-04-03 19:16:24.112305002 +0400
> > +++ device/goldelico/gta04/libsensors/gta04_sensors.c   2014-04-20
> > 20:53:55.927193884 +0400
> > @@ -218,7 +218,6 @@
> >  
> >         if (module == NULL || device == NULL)
> >                 return -EINVAL;
> >         gta04_sensors_device = (struct gta04_sensors_device *)
> >                 calloc(1, sizeof(struct gta04_sensors_device));
> >         gta04_sensors_device->device.common.tag = HARDWARE_DEVICE_TAG;
> > @@ -246,11 +245,14 @@
> >                 }
> >         }
> >  
> > -       gta04_sensors_device->poll_fds_count = p;
> > +       if (p > 0) {
> > +               gta04_sensors_device->poll_fds_count = p;
> >  
> > -       *device = &(gta04_sensors_device->device.common);
> > +               *device = &(gta04_sensors_device->device.common);
> >  
> > -       return 0;
> > +               return 0;
> > +       }
> > +       return -EINVAL;
> >  }
> >  
> >  int gta04_sensors_get_sensors_list(struct sensors_module_t* module,
> > 
> > I have test this patch only at my device, which has LIS302 chip.
> > Please, test it with 
> > ordinary devices.
> > 
> > Best regards, Alexandre
> > 
> > 
> 
>  On Fri, 2014-04-25 at 08:57 +0200, Lukas Maerdian wrote:
> > Hi Alexandre,
> > 
> > FYI: I've introduced a small patch, which fixes the problem with your
> > device non-booting, because of the missing BMA180 sensor:
> > http://git.goldelico.com/?p=gta04-replicant-device.git;a=commit;h=64fc50c97676050ce5dea75dc5c045675fc993e0
> > 
> > BR,
> >   Lukas
> > 
> > 2014-04-07 17:59 GMT+02:00 Lukas Maerdian <lukas at goldelico.com>:
> > > Try to configure a LIS302 driver into your kernel.
> > > E.g. that one: http://lxr.free-electrons.com/source/drivers/misc/lis3lv02d/
> > > (CONFIG_SENSORS_LIS3_I2C)
> > >
> > > Then check again in /sys/class/input/*/name for a lis3lv02d or
> > > similar. Set the correct permissions (via init.gta04.rc) for
> > > /dev/input/event* - corresponding to the input device where you found
> > > the correct name. Afterwards you have to update the libsensors (in
> > > devices/goldelico/gta04/libsensors/bma180.c) to check also for the
> > > name you found in /sys/class/input/*/name instead of just for
> > > "bma150".
> > >
> > > The rest of the HAL _should_ be pretty similar, as the LIS302 as well
> > > as the BMA180 both provide ABS_X/Y/Z data. But my devices don't have a
> > > LIS302, so I can't check. But please feel free to ask if you need
> > > further help!
> > >
> > > BR,
> > >   Lukas
> > >
> > > 2014-04-07 14:09 GMT+02:00 Alexandre Roumiantsev <ran at mail.wplus.net>:
> > >> Hello, Lukas
> > >>
> > >> I am sure in same kernal defconfig. But you really right - my device
> > >> is A3 model and I am looking now info about LIS302. Do have any?
> > >>
> > >> Best regards, Alexandre.
> > >>
> > >>
> > >>
> > >> 2014-04-07 14:46 GMT+04:00, Lukas Maerdian <lukas at goldelico.com>:
> > >>> 2014-04-06 6:42 GMT+02:00 Alexandre Roumiantsev <ran at mail.wplus.net>:
> > >>>> Hello
> > >>>>
> > >>>>> Also make sure, that /sys/class/input/input1/name is "bma150".
> > >>>>> Otherwise you need to set the correct permissions on another
> > >>>>> node.
> > >>>>
> > >>>> I have look at /sys/class/input/input1/name and find that it is
> > >>>> twl4030_pwrbutton
> > >>>> At my device I have next list of /sys/class/input/input?:
> > >>>>
> > >>>> /sys/class/input/input0
> > >>>> tsc2007
> > >>>> /sys/class/input/input1
> > >>>> twl4030_pwrbutton
> > >>>> /sys/class/input/input2
> > >>>> twl4030:vibrator
> > >>>> /sys/class/input/input3
> > >>>> gta04 Headset Jack
> > >>>> /sys/class/input/input4
> > >>>> Phone button
> > >>>> /sys/class/input/input5
> > >>>> 3G Wakeup
> > >>>
> > >>> Hi Alexandre,
> > >>>
> > >>> it looks like your BMA180 is not properly configured. Do you have the
> > >>> kernel driver loaded or compiled in? Are you using the same defconfig
> > >>> as in the 3.12-replicant4 branch? Are you using a GTA04A4 - I think as
> > >>> of this revision all devices should have the BMA180, some A3 models
> > >>> were also deployed with a LIS302.
> > >>>
> > >>> BR,
> > >>>   Lukas
> > >>>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-patch
Size: 6418 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20140517/92ecae75/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20140517/92ecae75/attachment.asc>


More information about the Gta04-owner mailing list