I found this on the P1531 code:
"P1531 Intake Camshaft Control Circuit Open"
I am presuming this means that the solenoid that adjusts the cam timing has an issue - the circuit is open. I'd be checking connections to see if a wire broke or if a connection is corroded. Could be a bad ground and it could be a failed solenoid.
Again, unless you give us more details on the car, the engine, a scan and so on, all we can do is guess. Everything I said here could be wrong.
As to the ECU switching off the light, it's possible this problem was intermittent and now the circuit is making contact so the ECU reset the MIL. I think it will be back and when it comes back, please post a complete autoscan so people can offer assistance.