I'm using a USB-to-Midi cable, as I did before on this machine when I was running Windows XP. Others need a small Konverter like Miditech MIDIFACE II just for example. Some keyboards can directly be connected with an USB-cable to your PC for MIDI.
I don't know, if I understand you correctly, but if you want to use the keyboard just as a MIDI-Controller, all drivers are already contained in your Linux distribution ('alsa-drivers'). Yamaha does not offer any Linux driver for the 235, though. I'd like to use up my Yamaha YPG-235 running Linux (Ubuntu 12.X).