rellla changed the topic of #linux-sunxi to: Allwinner/sunxi /development discussion - did you try looking at our wiki? https://linux-sunxi.org - Don't ask to ask. Just ask and wait! - https://github.com/linux-sunxi/ - Logs at http://irclog.whitequark.org/linux-sunxi - *only registered users can talk*
gaston__ has quit [Quit: Konversation terminated!]
popolon has quit [Quit: WeeChat 2.5]
ganbold has quit [Ping timeout: 248 seconds]
ganbold has joined #linux-sunxi
megi has quit [Ping timeout: 258 seconds]
Wizzup has quit [Ping timeout: 245 seconds]
ganbold_ has joined #linux-sunxi
ganbold has quit [Ping timeout: 246 seconds]
ganbold has joined #linux-sunxi
ganbold_ has quit [Ping timeout: 245 seconds]
nashpa has quit [Ping timeout: 245 seconds]
nashpa has joined #linux-sunxi
cnxsoft has joined #linux-sunxi
Putti has quit [Remote host closed the connection]
aballier has quit [Ping timeout: 245 seconds]
TheSeven has quit [Ping timeout: 264 seconds]
[7] has joined #linux-sunxi
aballier has joined #linux-sunxi
wwilly__ has joined #linux-sunxi
wwilly_ has quit [Ping timeout: 272 seconds]
Putti has joined #linux-sunxi
Putti has quit [Client Quit]
dddddd has quit [Remote host closed the connection]
PaddleStroke has joined #linux-sunxi
<PaddleStroke> hey guys, small question about reading/writing in sysfs files from a c++ code. I'm not very clear about the file format (binary or text) as they have no extension so I'm not sure how to read/write. Also I can't test much because the program I'm modifying takes ages to build so I'd prefer to get it right on first try.
<PaddleStroke> I need to read sys/class/brightness/brightness/current_brightness (which ranges from 0 to 100). Then wrrite back a different int in sys/class/brightness/brightness/brightness
<wens> some are documented in Documentation/ABI/
<wens> most sysfs files are text
<PaddleStroke> Maybe someone have a sample code?
<wens> I think people mostly do echo X > sysfs_file
<PaddleStroke> can this be done from a c++ code?
<wens> fopen, fprintf, fclose.
<wens> or fopen, fscanf, fclose
<wens> or the c++ equivalents using io streams
<PaddleStroke> Yes however I am not sure which to use between fwrite write and ofstream for example
<PaddleStroke> Can I jsut use any?
<PaddleStroke> or is there some special need
<PaddleStroke> when dealing with sys files
<wens> just treat it as any old text file
<wens> nothing special to them
<PaddleStroke> Got it thanks
<wens> if the format you write out isn't correct, like if you write out a string when it expects an integer string, you'll get an error
<wens> otherwise it's just a text file
<PaddleStroke> Ok. So I need to write the string "100"
<PaddleStroke> if the int to write is 100
<wens> right
<wens> correct
<wens> whitespace should be harmless, considering kernel space parses it with its own stdio library (IIRC)
_whitelogger has joined #linux-sunxi
Gerwin_J has joined #linux-sunxi
ganbold_ has joined #linux-sunxi
ganbold has quit [Ping timeout: 245 seconds]
<montjoie> jernej: I confirm for internal AC200 PHY on H3, in the old sun8i-emac days, I has written a PHY driver just for displaying the PHY name
Gerwin_J has quit [Read error: Connection reset by peer]
Gerwin_J has joined #linux-sunxi
pmpp_ is now known as pmp-p
PaddleStroke has quit [Remote host closed the connection]
Mangy_Dog has joined #linux-sunxi
Gerwin_J has quit [Ping timeout: 264 seconds]
Gerwin_J has joined #linux-sunxi
[7] has quit [Ping timeout: 264 seconds]
TheSeven has joined #linux-sunxi
_whitelogger has joined #linux-sunxi
Mangy_Dog has quit [Ping timeout: 245 seconds]
aalm has quit [Quit: xyz 2.3]
tl_lim has quit [Read error: Connection reset by peer]
cnxsoft has quit [Ping timeout: 272 seconds]
zoums has joined #linux-sunxi
zoums has quit [Remote host closed the connection]
cnxsoft has joined #linux-sunxi
swiftgeek has quit [Ping timeout: 246 seconds]
chewitt has joined #linux-sunxi
netlynx has joined #linux-sunxi
Wizzup has joined #linux-sunxi
superprower has quit [Ping timeout: 268 seconds]
AneoX has joined #linux-sunxi
chewitt has quit [Ping timeout: 245 seconds]
wwilly__ has quit [Quit: Leaving]
wwilly has joined #linux-sunxi
superprower has joined #linux-sunxi
_whitelogger has joined #linux-sunxi
swiftgeek has joined #linux-sunxi
Net147 has quit [Quit: Quit]
Net147 has joined #linux-sunxi
megi has joined #linux-sunxi
Gerwin_J has quit [Quit: Gerwin_J]
Gerwin_J has joined #linux-sunxi
Gerwin_J has quit [Ping timeout: 264 seconds]
deesix has quit [Ping timeout: 272 seconds]
deesix has joined #linux-sunxi
reinforce has joined #linux-sunxi
lykt has quit [Quit: leaving]
dddddd has joined #linux-sunxi
lykt has joined #linux-sunxi
superprower has quit [Ping timeout: 245 seconds]
maz has quit [Quit: Leaving]
AneoX has quit [Read error: Connection reset by peer]
AneoX has joined #linux-sunxi
SopaXorzTaker has joined #linux-sunxi
JohnDoe_71Rus has joined #linux-sunxi
gaston_ has joined #linux-sunxi
superprower has joined #linux-sunxi
xes has quit [Quit: bye..]
xes has joined #linux-sunxi
kaspter has quit [Quit: kaspter]
vagrantc has joined #linux-sunxi
superprower has quit [Ping timeout: 244 seconds]
vagrantc has quit [Quit: leaving]
<MoeIcenowy> jernej: yes
<MoeIcenowy> montjoie: thanks. in torvalds/linux master?
<MoeIcenowy> jernej: where do you have the H6 EPHY code?
superprower has joined #linux-sunxi
<MoeIcenowy> I want to test it on my RP-H6B
<jernej> note that I didn't solve dependency problem yet
<jernej> so you have to use built-in drivers for anything AC200 EPHY related (I2C, PWM, clk-pwm, AC200 MFD, AC200 EPHY)
<jernej> and make sure that stmmac-sun8i or whatever is called to be module
<jernej> oh, I forgot, SID driver also needs to be built-in
megi has quit [Ping timeout: 246 seconds]
<MoeIcenowy> oh interesting
<MoeIcenowy> speed bin based cpufreq driver entered linux-next
<montjoie> MoeIcenowy: that was just a copy of generic.phy with an ID change
<montjoie> nothing more
<MoeIcenowy> montjoie: what do you mean?
<montjoie> you asked if this PHY driver was in mainline, it is not at all
tllim has joined #linux-sunxi
cnxsoft has quit [Quit: cnxsoft]
lykt has quit [Quit: leaving]
<jernej> MoeIcenowy: I was surprised too about that cpufreq patch
<jernej> hopefully other parts will be ready soon
<JohnDoe_71Rus> jernej: for libreelec a20 image, can i fix some virtual MAC address for Ethernet connections? Some kernel options, without rebuild image?
<jernej> you can set it in U-Boot and then save environment, so U-Boot will inject it in DT before each kernel boot, but I don't know specifics
<jernej> better to update U-Boot with appropriate DT, so it will do this automatically
DonkeyHotei has quit [Read error: Connection reset by peer]
<montjoie> if nobody do serious comment on amlogic crypto driver, I will send sun8i-ce on monday. finally!!
<wens> yay
<wens> MoeIcenowy: would it be possible to ask wink for specifics about the internal RC-oscilator?
<montjoie> the last quest of valid yaml was hard
<MoeIcenowy> wens: whatRC?
<MoeIcenowy> RTC one?
<wens> montjoie: you haven't implemented TRNG because of missing rc-oscilator stuff, right?
<montjoie> wens: yes
<wens> MoeIcenowy: yes. specifically, are there any controls to turn it on and off, and if so, which register and bit is it
kaspter has joined #linux-sunxi
<wens> montjoie: hmm, crypto's rng is prng though. for trng, you would use hwrng API instead?
<montjoie> wens: yes not a problem
<montjoie> i have already code for it
wwilly_ has joined #linux-sunxi
megi has joined #linux-sunxi
wwilly has quit [Ping timeout: 244 seconds]
DonkeyHotei has joined #linux-sunxi
RichardG867 has quit [Ping timeout: 264 seconds]
RichardG867 has joined #linux-sunxi
SopaXorzTaker has quit [Quit: Leaving]
wigyori has quit [Ping timeout: 245 seconds]
gaston_ has quit [Quit: Konversation terminated!]
kaspter has quit [Quit: kaspter]
Gerwin_J has joined #linux-sunxi
Gerwin_J has quit [Quit: Gerwin_J]
Gerwin_J has joined #linux-sunxi
Gerwin_J has quit [Client Quit]
Gerwin_J has joined #linux-sunxi
Gerwin_J has quit [Client Quit]
megi has quit [Ping timeout: 258 seconds]
vagrantc has joined #linux-sunxi
lykt has joined #linux-sunxi
_whitelogger has joined #linux-sunxi
paulk-leonov-spa has joined #linux-sunxi
paulk-leonov has quit [Ping timeout: 268 seconds]
AneoX has quit [Quit: Textual IRC Client: www.textualapp.com]
chewitt has joined #linux-sunxi
vagrantc has quit [Quit: leaving]
Putti has joined #linux-sunxi
ninolein has joined #linux-sunxi
Putti has quit [Ping timeout: 272 seconds]
jelly has quit [Ping timeout: 268 seconds]
jelly-home has joined #linux-sunxi
jelly-home is now known as jelly
JohnDoe_71Rus has quit [Quit: KVIrc KVIrc Aria 5.0.0, revision: 5.0.0+git-7422-2fe1a3bca, build type: debug, sources date: 20160102, built on: 2019-07-01 08:27:19 UTC 5.0.0+git-7422-2fe1a3bca http://www.kvirc.net/]
Mangy_Dog has joined #linux-sunxi
yann has quit [Ping timeout: 246 seconds]
ninolein has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
megi has joined #linux-sunxi
popolon has joined #linux-sunxi
mzki has quit [Ping timeout: 248 seconds]
mzki has joined #linux-sunxi
Putti has joined #linux-sunxi
Putti has quit [Client Quit]
netlynx has quit [Quit: Ex-Chat]
RichardG867_ has joined #linux-sunxi
RichardG867 has quit [Ping timeout: 248 seconds]
reinforce has quit [Quit: Leaving.]
Mangy_Dog has quit [Ping timeout: 258 seconds]
popolon has quit [Quit: WeeChat 2.5]
_whitelogger has joined #linux-sunxi